summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--functions.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/functions.php b/functions.php
index f40ce7618..7d65c9038 100644
--- a/functions.php
+++ b/functions.php
@@ -821,8 +821,8 @@
}
function truncate_string($str, $max_len) {
- if (mb_strlen($str) > $max_len - 3) {
- return mb_substr($str, 0, $max_len) . "...";
+ if (mb_strlen($str, "utf-8") > $max_len - 3) {
+ return mb_substr($str, 0, $max_len, "utf-8") . "...";
} else {
return $str;
}