diff --git a/core/MyHelpers.class.inc.php b/core/MyHelpers.class.inc.php index 8ee89a5ff..16e149cd9 100644 --- a/core/MyHelpers.class.inc.php +++ b/core/MyHelpers.class.inc.php @@ -434,9 +434,10 @@ class Str } public static function pure2html($pure, $maxLength = false) { + // Check for HTML entities, but be careful the DB is in UTF-8 return $maxLength - ? htmlentities(substr($pure, 0, $maxLength)) - : htmlentities($pure); + ? htmlentities(substr($pure, 0, $maxLength), ENT_COMPAT, 'UTF-8') + : htmlentities($pure, ENT_COMPAT, 'UTF-8'); } public static function pure2sql($pure, $maxLength = false) {