BUGFIX HTMLText->LimitCharacters() to use UTF8 compatible htmlentities() and html_entity_decode() calls

This commit is contained in:
Ingo Schommer 2010-12-08 12:51:56 +13:00
parent 09283fba88
commit 2667fc6ef0

View File

@ -29,11 +29,11 @@ class HTMLText extends Text {
// Content html text to plan text before sub string-ing
// to cutting off part of the html entity character
// For example, & because &am
$value = html_entity_decode($value);
$value = html_entity_decode($value, ENT_COMPAT, 'UTF-8');
$value = (strlen($value) > $limit) ? substr($value, 0, $limit) . $add : $value;
// Convert plan text back to html entities
$value = htmlentities($value);
$value = htmlentities($value, ENT_COMPAT, 'UTF-8');
return $value;
}