Latte\Runtime\Filters::escapeHtml PHP Method

escapeHtml() public static method

Escapes string for use inside HTML.
public static escapeHtml ( $s ) : string
return string HTML
    public static function escapeHtml($s)
    {
        return htmlSpecialChars($s, ENT_QUOTES, 'UTF-8');
    }

Usage Example

Beispiel #1
0
 private function fixComment($text)
 {
     $escaped = \Latte\Runtime\Filters::escapeHtml($text, ENT_COMPAT);
     $esmiled = $this->smileReplace($escaped);
     $reg = '#(http://|ftp://|(www\\.))([\\w\\-]*\\.[\\w\\-\\.]*([/?][^\\s]*)?)#';
     return preg_replace_callback($reg, 'self::createLink', $esmiled);
 }
All Usage Examples Of Latte\Runtime\Filters::escapeHtml