Bug fixes

This commit is contained in:
dignajar 2015-06-27 00:51:43 -03:00
parent 8be6a1425e
commit 3d4e2cd526
1 changed files with 7 additions and 1 deletions

View File

@ -5,7 +5,13 @@ class Sanitize {
// new // new
public static function html($text) public static function html($text)
{ {
return htmlspecialchars($text, ENT_COMPAT|ENT_HTML5, CHARSET); $flags = ENT_COMPAT;
if(defined('ENT_HTML5')) {
$flags = ENT_COMPAT|ENT_HTML5;
}
return htmlspecialchars($text, $flags, CHARSET);
} }
public static function pathFile($path, $file) public static function pathFile($path, $file)