revert max ui feed title length, tweak truncate_string a bit

master
Andrew Dolgov 11 years ago
parent 66684d8149
commit 878a0083ff

@ -68,7 +68,7 @@ class Feeds extends Handler_Protected {
$target = "target=\"_blank\"";
$reply .= "<a title=\"$last_updated\" $target href=\"$feed_site_url\">".
truncate_string($feed_title, 20)."</a>";
truncate_string($feed_title, 30)."</a>";
if ($error) {
$error = htmlspecialchars($error);

@ -879,7 +879,7 @@
}
function truncate_string($str, $max_len, $suffix = '&hellip;') {
if (mb_strlen($str, "utf-8") > $max_len - 3) {
if (mb_strlen($str, "utf-8") > $max_len) {
return mb_substr($str, 0, $max_len, "utf-8") . $suffix;
} else {
return $str;

Loading…
Cancel
Save