aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/front/controller
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2021-01-19 17:49:19 +0100
committerArthurHoaro <arthur@hoa.ro>2021-01-19 17:49:19 +0100
commit9ef8555ad298668bcb8537ccdd2ab6560f44177f (patch)
treeba23e5d76d3d1f9eb95231ea6504d283f86d7722 /application/front/controller
parentffa39719a17982e6a6cac9bc3f758aa12fa69973 (diff)
downloadShaarli-9ef8555ad298668bcb8537ccdd2ab6560f44177f.tar.gz
Shaarli-9ef8555ad298668bcb8537ccdd2ab6560f44177f.tar.zst
Shaarli-9ef8555ad298668bcb8537ccdd2ab6560f44177f.zip
Support search highlights when matching URL content
DefaultFormatter: - format 'a' tag content and not href attribute - format hashtags properly Markdown(Extra)Formatter: - Extend Parsedown to format highlight properly: https://github.com/erusev/parsedown/wiki/Tutorial:-Create-Extensions Fixes #1681
Diffstat (limited to 'application/front/controller')
-rw-r--r--application/front/controller/visitor/BookmarkListController.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/application/front/controller/visitor/BookmarkListController.php b/application/front/controller/visitor/BookmarkListController.php
index fe8231be..106440b6 100644
--- a/application/front/controller/visitor/BookmarkListController.php
+++ b/application/front/controller/visitor/BookmarkListController.php
@@ -33,6 +33,7 @@ class BookmarkListController extends ShaarliVisitorController
33 33
34 $formatter = $this->container->formatterFactory->getFormatter(); 34 $formatter = $this->container->formatterFactory->getFormatter();
35 $formatter->addContextData('base_path', $this->container->basePath); 35 $formatter->addContextData('base_path', $this->container->basePath);
36 $formatter->addContextData('index_url', index_url($this->container->environment));
36 37
37 $searchTags = normalize_spaces($request->getParam('searchtags') ?? ''); 38 $searchTags = normalize_spaces($request->getParam('searchtags') ?? '');
38 $searchTerm = escape(normalize_spaces($request->getParam('searchterm') ?? '')); 39 $searchTerm = escape(normalize_spaces($request->getParam('searchterm') ?? ''));
@@ -157,6 +158,7 @@ class BookmarkListController extends ShaarliVisitorController
157 158
158 $formatter = $this->container->formatterFactory->getFormatter(); 159 $formatter = $this->container->formatterFactory->getFormatter();
159 $formatter->addContextData('base_path', $this->container->basePath); 160 $formatter->addContextData('base_path', $this->container->basePath);
161 $formatter->addContextData('index_url', index_url($this->container->environment));
160 162
161 $data = array_merge( 163 $data = array_merge(
162 $this->initializeTemplateVars(), 164 $this->initializeTemplateVars(),