1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-15 20:55:56 +00:00

remove headlines overflow hack, made truncate_string() utf-8 aware

This commit is contained in:
Andrew Dolgov
2005-12-30 21:05:26 +01:00
parent 1e18cf4b5a
commit 070d0d2a2e
3 changed files with 5 additions and 5 deletions

View File

@@ -821,8 +821,8 @@
}
function truncate_string($str, $max_len) {
if (strlen($str) > $max_len) {
return substr($str, 0, $max_len) . "...";
if (mb_strlen($str) > $max_len - 3) {
return mb_substr($str, 0, $max_len) . "...";
} else {
return $str;
}