*/
class BookmarkDefaultFormatter extends BookmarkFormatter
{
- const SEARCH_HIGHLIGHT_OPEN = '|@@HIGHLIGHT';
- const SEARCH_HIGHLIGHT_CLOSE = 'HIGHLIGHT@@|';
+ protected const SEARCH_HIGHLIGHT_OPEN = '|@@HIGHLIGHT';
+ protected const SEARCH_HIGHLIGHT_CLOSE = 'HIGHLIGHT@@|';
/**
* @inheritdoc
$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);
}
/**
*/
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);
*/
protected function formatTagString($bookmark)
{
- return implode(' ', $this->formatTagList($bookmark));
+ return implode($this->conf->get('general.tags_separator'), $this->formatTagList($bookmark));
}
/**