Browse Source

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

pull/40/head
Macil Tech 10 years ago
parent
commit
1d4fced75a
  1. 2
      inc/display.php

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

Loading…
Cancel
Save