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 /index.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 'index.php')
-rw-r--r-- | index.php | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1601,8 +1601,8 @@ function renderPage($conf, $pluginManager, $LINKSDB) | |||
1601 | function buildLinkList($PAGE,$LINKSDB, $conf, $pluginManager) | 1601 | function buildLinkList($PAGE,$LINKSDB, $conf, $pluginManager) |
1602 | { | 1602 | { |
1603 | // Used in templates | 1603 | // Used in templates |
1604 | $searchtags = !empty($_GET['searchtags']) ? escape($_GET['searchtags']) : ''; | 1604 | $searchtags = !empty($_GET['searchtags']) ? escape(normalize_spaces($_GET['searchtags'])) : ''; |
1605 | $searchterm = !empty($_GET['searchterm']) ? escape($_GET['searchterm']) : ''; | 1605 | $searchterm = !empty($_GET['searchterm']) ? escape(normalize_spaces($_GET['searchterm'])) : ''; |
1606 | 1606 | ||
1607 | // Smallhash filter | 1607 | // Smallhash filter |
1608 | if (! empty($_SERVER['QUERY_STRING']) | 1608 | if (! empty($_SERVER['QUERY_STRING']) |
@@ -1649,7 +1649,7 @@ function buildLinkList($PAGE,$LINKSDB, $conf, $pluginManager) | |||
1649 | } else { | 1649 | } else { |
1650 | $link['updated_timestamp'] = ''; | 1650 | $link['updated_timestamp'] = ''; |
1651 | } | 1651 | } |
1652 | $taglist = explode(' ', $link['tags']); | 1652 | $taglist = preg_split('/\s+/', $link['tags'], -1, PREG_SPLIT_NO_EMPTY); |
1653 | uasort($taglist, 'strcasecmp'); | 1653 | uasort($taglist, 'strcasecmp'); |
1654 | $link['taglist'] = $taglist; | 1654 | $link['taglist'] = $taglist; |
1655 | // Check for both signs of a note: starting with ? and 7 chars long. | 1655 | // Check for both signs of a note: starting with ? and 7 chars long. |