From 3d4e2cd5260eb62d349f19c2b0603dc2ec44c8e7 Mon Sep 17 00:00:00 2001 From: dignajar Date: Sat, 27 Jun 2015 00:51:43 -0300 Subject: [PATCH] Bug fixes --- kernel/helpers/sanitize.class.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/kernel/helpers/sanitize.class.php b/kernel/helpers/sanitize.class.php index 65c1021b..2beb9e13 100644 --- a/kernel/helpers/sanitize.class.php +++ b/kernel/helpers/sanitize.class.php @@ -5,7 +5,13 @@ class Sanitize { // new 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)