diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-11-08 14:07:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-08 14:07:33 +0100 |
commit | d9d71b10c3bc70a0881d630b37dc4e918c9e812f (patch) | |
tree | d8f772a9106fbd5072ebee1b9fa536babe90f7b1 /application/netscape/NetscapeBookmarkUtils.php | |
parent | c51d65238be43d61b7e6a6f9940948afea0c13fa (diff) | |
parent | 8a1ce1da15fdbae99b24700b06f2008c7a657603 (diff) | |
download | Shaarli-d9d71b10c3bc70a0881d630b37dc4e918c9e812f.tar.gz Shaarli-d9d71b10c3bc70a0881d630b37dc4e918c9e812f.tar.zst Shaarli-d9d71b10c3bc70a0881d630b37dc4e918c9e812f.zip |
Merge pull request #1621 from ArthurHoaro/feature/tag-separators
Diffstat (limited to 'application/netscape/NetscapeBookmarkUtils.php')
-rw-r--r-- | application/netscape/NetscapeBookmarkUtils.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/application/netscape/NetscapeBookmarkUtils.php b/application/netscape/NetscapeBookmarkUtils.php index b83f16f8..6ca728b7 100644 --- a/application/netscape/NetscapeBookmarkUtils.php +++ b/application/netscape/NetscapeBookmarkUtils.php | |||
@@ -101,11 +101,11 @@ class NetscapeBookmarkUtils | |||
101 | 101 | ||
102 | // Add tags to all imported bookmarks? | 102 | // Add tags to all imported bookmarks? |
103 | if (empty($post['default_tags'])) { | 103 | if (empty($post['default_tags'])) { |
104 | $defaultTags = array(); | 104 | $defaultTags = []; |
105 | } else { | 105 | } else { |
106 | $defaultTags = preg_split( | 106 | $defaultTags = tags_str2array( |
107 | '/[\s,]+/', | 107 | escape($post['default_tags']), |
108 | escape($post['default_tags']) | 108 | $this->conf->get('general.tags_separator', ' ') |
109 | ); | 109 | ); |
110 | } | 110 | } |
111 | 111 | ||
@@ -171,7 +171,7 @@ class NetscapeBookmarkUtils | |||
171 | $link->setUrl($bkm['uri'], $this->conf->get('security.allowed_protocols')); | 171 | $link->setUrl($bkm['uri'], $this->conf->get('security.allowed_protocols')); |
172 | $link->setDescription($bkm['note']); | 172 | $link->setDescription($bkm['note']); |
173 | $link->setPrivate($private); | 173 | $link->setPrivate($private); |
174 | $link->setTagsString($bkm['tags']); | 174 | $link->setTags($bkm['tags']); |
175 | 175 | ||
176 | $this->bookmarkService->addOrSet($link, false); | 176 | $this->bookmarkService->addOrSet($link, false); |
177 | $importCount++; | 177 | $importCount++; |