diff --git a/inc/display.php b/inc/display.php index 57110224..6d8cf366 100644 --- a/inc/display.php +++ b/inc/display.php @@ -118,7 +118,7 @@ function pm_snippet($body, $len=null) { // calculate strlen() so we can add "..." after if needed $strlen = mb_strlen($body); - $body = substr($body, 0, $len); + $body = mb_substr($body, 0, $len); // Re-escape the characters. return '' . utf8tohtml($body) . ($strlen > $len ? '…' : '') . '';