]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - application/LinkFilter.php
Fixes presence of empty tags for private tags and in search results
[github/shaarli/Shaarli.git] / application / LinkFilter.php
index daa6d9cc26a8ed139f34581ff619d98969415073..57ebfd5cb8070e55bd87545f9ad716434a8c488b 100644 (file)
@@ -348,7 +348,7 @@ class LinkFilter
         $tagsOut = $casesensitive ? $tags : mb_convert_case($tags, MB_CASE_LOWER, 'UTF-8');
         $tagsOut = str_replace(',', ' ', $tagsOut);
 
-        return array_values(array_filter(explode(' ', trim($tagsOut)), 'strlen'));
+        return preg_split('/\s+/', $tagsOut, -1, PREG_SPLIT_NO_EMPTY);
     }
 }