Permalink
Browse files

BUGFIX HTMLText->LimitCharacters() to use UTF8 compatible htmlentitie…

…s() and html_entity_decode() calls
  • Loading branch information...
1 parent 09283fb commit 2667fc6ef079a5cf831e1cf1733308f8ed1fd857 @chillu chillu committed Dec 7, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 core/model/fieldtypes/HTMLText.php
@@ -29,11 +29,11 @@ function LimitCharacters($limit = 20, $add = "...") {
// 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;
}

0 comments on commit 2667fc6

Please sign in to comment.