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');