mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-14 01:15:56 +00:00
revert max ui feed title length, tweak truncate_string a bit
This commit is contained in:
@@ -68,7 +68,7 @@ class Feeds extends Handler_Protected {
|
|||||||
|
|
||||||
$target = "target=\"_blank\"";
|
$target = "target=\"_blank\"";
|
||||||
$reply .= "<a title=\"$last_updated\" $target href=\"$feed_site_url\">".
|
$reply .= "<a title=\"$last_updated\" $target href=\"$feed_site_url\">".
|
||||||
truncate_string($feed_title, 20)."</a>";
|
truncate_string($feed_title, 30)."</a>";
|
||||||
|
|
||||||
if ($error) {
|
if ($error) {
|
||||||
$error = htmlspecialchars($error);
|
$error = htmlspecialchars($error);
|
||||||
|
|||||||
@@ -879,7 +879,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function truncate_string($str, $max_len, $suffix = '…') {
|
function truncate_string($str, $max_len, $suffix = '…') {
|
||||||
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;
|
return mb_substr($str, 0, $max_len, "utf-8") . $suffix;
|
||||||
} else {
|
} else {
|
||||||
return $str;
|
return $str;
|
||||||
|
|||||||
Reference in New Issue
Block a user