summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/functions.php b/functions.php
index 32a5b2ec3..b67ff9570 100644
--- a/functions.php
+++ b/functions.php
@@ -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);
+
+ $tmp_tags_str = implode(", ", $formatted_tags);
- if ($num_tags == $tag_limit) {
+ if ($num_tags == $tag_limit || mb_strlen($tmp_tags_str) > 150) {
break;
}
}