]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
don't show empty tag links for bookmarks
authorEvan Prodromou <evan@status.net>
Thu, 21 Apr 2011 20:13:47 +0000 (16:13 -0400)
committerEvan Prodromou <evan@status.net>
Thu, 21 Apr 2011 20:13:47 +0000 (16:13 -0400)
plugins/Bookmark/bookmarklistitem.php

index 65ebe5036774160ba5717cf31fbf378257cead95..d099c75ecd8843072890f9a7bbaff823b3013449 100644 (file)
@@ -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');