1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-27 17:00:52 +01:00

pm_snippet() should probably use mb_substr if it's using mb_strlen.

This commit is contained in:
Macil Tech 2013-03-01 08:42:38 +08:00
parent 3bcc87caf2
commit 1d4fced75a

View File

@ -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 '<em>' . utf8tohtml($body) . ($strlen > $len ? '&hellip;' : '') . '</em>';