From 1d4fced75acc7a39abdceaf7ea563c2b5d131839 Mon Sep 17 00:00:00 2001 From: Macil Tech Date: Fri, 1 Mar 2013 08:42:38 +0800 Subject: [PATCH] pm_snippet() should probably use mb_substr if it's using mb_strlen. --- inc/display.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ? '…' : '') . '';