- Fixed bug Trac #65: incorrect display of non-ASCII characters. htmlentities must be aware of the charset used !

SVN:trunk[217]
This commit is contained in:
Denis Flaven
2009-12-29 17:08:04 +00:00
parent 699e6b4e6e
commit 7efeec5acd

View File

@@ -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)
{