diff options
author | ArthurHoaro <arthur@hoa.ro> | 2016-08-02 10:34:21 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2016-08-02 10:34:21 +0200 |
commit | 9866b40814a120f1a019f9f2c8ef66f44e1ddfcb (patch) | |
tree | 2ab5f36db51fb71188c4d978682027f8e1a7e707 /application | |
parent | 32d51093e32e9293e840fbda61cfcfed2d3bd4b6 (diff) | |
download | Shaarli-9866b40814a120f1a019f9f2c8ef66f44e1ddfcb.tar.gz Shaarli-9866b40814a120f1a019f9f2c8ef66f44e1ddfcb.tar.zst Shaarli-9866b40814a120f1a019f9f2c8ef66f44e1ddfcb.zip |
Better whitespace handling in tags
Correct PR #573 to work properly with hidden tags, and add ReferenceLinkDB UT.
Fixes #571 - Closes #573
Diffstat (limited to 'application')
-rw-r--r-- | application/LinkDB.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/application/LinkDB.php b/application/LinkDB.php index e9d216ea..d80434bf 100644 --- a/application/LinkDB.php +++ b/application/LinkDB.php | |||
@@ -291,7 +291,7 @@ You use the community supported version of the original Shaarli project, by Seba | |||
291 | 291 | ||
292 | // Remove private tags if the user is not logged in. | 292 | // Remove private tags if the user is not logged in. |
293 | if (! $this->_loggedIn) { | 293 | if (! $this->_loggedIn) { |
294 | $link['tags'] = preg_replace('/(^|\s*)\.[^($| )]+\s*$/', '', $link['tags']); | 294 | $link['tags'] = preg_replace('/(^|\s+)\.[^($|\s)]+\s*/', ' ', $link['tags']); |
295 | } | 295 | } |
296 | 296 | ||
297 | // Do not use the redirector for internal links (Shaarli note URL starting with a '?'). | 297 | // Do not use the redirector for internal links (Shaarli note URL starting with a '?'). |