From: Evan Prodromou Date: Thu, 21 Apr 2011 20:13:47 +0000 (-0400) Subject: don't show empty tag links for bookmarks X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a821ec4963977203bb20980f82edbba6c913e96d;p=quix0rs-gnu-social.git don't show empty tag links for bookmarks --- diff --git a/plugins/Bookmark/bookmarklistitem.php b/plugins/Bookmark/bookmarklistitem.php index 65ebe50367..d099c75ecd 100644 --- a/plugins/Bookmark/bookmarklistitem.php +++ b/plugins/Bookmark/bookmarklistitem.php @@ -109,13 +109,16 @@ class BookmarkListItem extends NoticeListItemAdapter } foreach ($tags as $tag) { - $out->elementStart('li'); - $out->element('a', - array('rel' => 'tag', - 'href' => Notice_tag::url($tag)), - $tag); - $out->elementEnd('li'); - $out->text(' '); + $tag = trim($tag); + if (!empty($tag)) { + $out->elementStart('li'); + $out->element('a', + array('rel' => 'tag', + 'href' => Notice_tag::url($tag)), + $tag); + $out->elementEnd('li'); + $out->text(' '); + } } $out->elementEnd('ul');