format_tags_string: improve detection of layout breaking extra-long tag strings
This commit is contained in:
parent
ab553f9ac5
commit
275a0af23d
|
@ -6158,11 +6158,17 @@
|
|||
$num_tags++;
|
||||
$tag_escaped = str_replace("'", "\\'", $tag);
|
||||
|
||||
if (mb_strlen($tag) > 30) {
|
||||
$tag = truncate_string($tag, 30);
|
||||
}
|
||||
|
||||
$tag_str = "<a href=\"javascript:viewfeed('$tag_escaped')\">$tag</a>";
|
||||
|
||||
array_push($formatted_tags, $tag_str);
|
||||
|
||||
if ($num_tags == $tag_limit) {
|
||||
$tmp_tags_str = implode(", ", $formatted_tags);
|
||||
|
||||
if ($num_tags == $tag_limit || mb_strlen($tmp_tags_str) > 150) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue