diff options
author | wclouser@mozilla.com <wclouser@mozilla.com@4eb1ac78-321c-0410-a911-ec516a8615a5> | 2009-03-17 17:53:11 (GMT) |
---|---|---|
committer | wclouser@mozilla.com <wclouser@mozilla.com@4eb1ac78-321c-0410-a911-ec516a8615a5> | 2009-03-17 17:53:11 (GMT) |
commit | ceb84981f19568dc364075f0e2d9d5f29bfaef7c (patch) | |
tree | bc66349fa010c1ce38912b39878bd136869cd70b | |
parent | c20e95d850406266df1b7de4298d61378e60ba7d (diff) |
make truncateChars() multibyte safe; bug 483814
git-svn-id: http://svn.mozilla.org/addons/trunk@23429 4eb1ac78-321c-0410-a911-ec516a8615a5
-rw-r--r-- | site/app/views/helpers/addons_html.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/site/app/views/helpers/addons_html.php b/site/app/views/helpers/addons_html.php index a74b69f..b2d90b6 100644 --- a/site/app/views/helpers/addons_html.php +++ b/site/app/views/helpers/addons_html.php @@ -484,10 +484,10 @@ class AddonsHtmlHelper extends HtmlHelper } function truncateChars($length, $string) { - if (strlen($string) <= $length) { + if (mb_strlen($string) <= $length) { return $string; } else { - $sub = substr($string, 0, $length - 3); + $sub = mb_substr($string, 0, $length - 3); return $sub.'...'; } } |