X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=application%2Fformatter%2FBookmarkDefaultFormatter.php;h=51bea0f15082ee2ed168446f7fd15f207f7cdd54;hb=b3bd8c3e8d367975980043e772f7cd78b7f96bc6;hp=d58a5e39dde46ca5f5f0c71ac80e1f60fde8e55b;hpb=6866ed766f917f37bc7e1276779dece63d0f2835;p=github%2Fshaarli%2FShaarli.git diff --git a/application/formatter/BookmarkDefaultFormatter.php b/application/formatter/BookmarkDefaultFormatter.php index d58a5e39..51bea0f1 100644 --- a/application/formatter/BookmarkDefaultFormatter.php +++ b/application/formatter/BookmarkDefaultFormatter.php @@ -46,8 +46,13 @@ class BookmarkDefaultFormatter extends BookmarkFormatter $bookmark->getDescription() ?? '', $bookmark->getAdditionalContentEntry('search_highlight')['description'] ?? [] ); + $description = format_description( + escape($description), + $indexUrl, + $this->conf->get('formatter_settings.autolink', true) + ); - return $this->replaceTokens(format_description(escape($description), $indexUrl)); + return $this->replaceTokens($description); } /** @@ -63,15 +68,16 @@ class BookmarkDefaultFormatter extends BookmarkFormatter */ protected function formatTagListHtml($bookmark) { + $tagsSeparator = $this->conf->get('general.tags_separator', ' '); if (empty($bookmark->getAdditionalContentEntry('search_highlight')['tags'])) { return $this->formatTagList($bookmark); } $tags = $this->tokenizeSearchHighlightField( - $bookmark->getTagsString(), + $bookmark->getTagsString($tagsSeparator), $bookmark->getAdditionalContentEntry('search_highlight')['tags'] ); - $tags = $this->filterTagList(explode(' ', $tags)); + $tags = $this->filterTagList(tags_str2array($tags, $tagsSeparator)); $tags = escape($tags); $tags = $this->replaceTokensArray($tags); @@ -83,7 +89,7 @@ class BookmarkDefaultFormatter extends BookmarkFormatter */ protected function formatTagString($bookmark) { - return implode(' ', $this->formatTagList($bookmark)); + return implode($this->conf->get('general.tags_separator'), $this->formatTagList($bookmark)); } /**