From b3bd8c3e8d367975980043e772f7cd78b7f96bc6 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Thu, 22 Oct 2020 16:21:03 +0200 Subject: Feature: support any tag separator So it allows to have multiple words tags. Breaking change: commas ',' are no longer a default separator. Fixes #594 --- application/netscape/NetscapeBookmarkUtils.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'application/netscape') 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 // Add tags to all imported bookmarks? if (empty($post['default_tags'])) { - $defaultTags = array(); + $defaultTags = []; } else { - $defaultTags = preg_split( - '/[\s,]+/', - escape($post['default_tags']) + $defaultTags = tags_str2array( + escape($post['default_tags']), + $this->conf->get('general.tags_separator', ' ') ); } @@ -171,7 +171,7 @@ class NetscapeBookmarkUtils $link->setUrl($bkm['uri'], $this->conf->get('security.allowed_protocols')); $link->setDescription($bkm['note']); $link->setPrivate($private); - $link->setTagsString($bkm['tags']); + $link->setTags($bkm['tags']); $this->bookmarkService->addOrSet($link, false); $importCount++; -- cgit v1.2.3