diff options
author | Arthur <arthur@hoa.ro> | 2017-01-03 09:57:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-03 09:57:52 +0100 |
commit | 64497fb3020e9d2e2c0f9c55c4d10fedbc7a9f79 (patch) | |
tree | befc1823dfc935fd827e6753b48f53d8150c3493 /application/LinkFilter.php | |
parent | e0177549c760b143efdd17b1579e0c0199dce939 (diff) | |
parent | b3051a6aae446e063c3b6fa4a6a600357a9f24af (diff) | |
download | Shaarli-64497fb3020e9d2e2c0f9c55c4d10fedbc7a9f79.tar.gz Shaarli-64497fb3020e9d2e2c0f9c55c4d10fedbc7a9f79.tar.zst Shaarli-64497fb3020e9d2e2c0f9c55c4d10fedbc7a9f79.zip |
Merge pull request #725 from ArthurHoaro/hotfix/privatetags-split
Fixes presence of empty tags for private tags and in search results
Diffstat (limited to 'application/LinkFilter.php')
-rw-r--r-- | application/LinkFilter.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/application/LinkFilter.php b/application/LinkFilter.php index daa6d9cc..57ebfd5c 100644 --- a/application/LinkFilter.php +++ b/application/LinkFilter.php | |||
@@ -348,7 +348,7 @@ class LinkFilter | |||
348 | $tagsOut = $casesensitive ? $tags : mb_convert_case($tags, MB_CASE_LOWER, 'UTF-8'); | 348 | $tagsOut = $casesensitive ? $tags : mb_convert_case($tags, MB_CASE_LOWER, 'UTF-8'); |
349 | $tagsOut = str_replace(',', ' ', $tagsOut); | 349 | $tagsOut = str_replace(',', ' ', $tagsOut); |
350 | 350 | ||
351 | return array_values(array_filter(explode(' ', trim($tagsOut)), 'strlen')); | 351 | return preg_split('/\s+/', $tagsOut, -1, PREG_SPLIT_NO_EMPTY); |
352 | } | 352 | } |
353 | } | 353 | } |
354 | 354 | ||