From a821ec4963977203bb20980f82edbba6c913e96d Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Thu, 21 Apr 2011 16:13:47 -0400 Subject: [PATCH] don't show empty tag links for bookmarks --- plugins/Bookmark/bookmarklistitem.php | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) 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');