diff options
Diffstat (limited to 'application/front/controller/visitor/BookmarkListController.php')
-rw-r--r-- | application/front/controller/visitor/BookmarkListController.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/application/front/controller/visitor/BookmarkListController.php b/application/front/controller/visitor/BookmarkListController.php index 78c474c9..cc3837ce 100644 --- a/application/front/controller/visitor/BookmarkListController.php +++ b/application/front/controller/visitor/BookmarkListController.php | |||
@@ -95,6 +95,10 @@ class BookmarkListController extends ShaarliVisitorController | |||
95 | $next_page_url = '?page=' . ($page - 1) . $searchtermUrl . $searchtagsUrl; | 95 | $next_page_url = '?page=' . ($page - 1) . $searchtermUrl . $searchtagsUrl; |
96 | } | 96 | } |
97 | 97 | ||
98 | $tagsSeparator = $this->container->conf->get('general.tags_separator', ' '); | ||
99 | $searchTagsUrlEncoded = array_map('urlencode', tags_str2array($searchTags, $tagsSeparator)); | ||
100 | $searchTags = !empty($searchTags) ? trim($searchTags, $tagsSeparator) . $tagsSeparator : ''; | ||
101 | |||
98 | // Fill all template fields. | 102 | // Fill all template fields. |
99 | $data = array_merge( | 103 | $data = array_merge( |
100 | $this->initializeTemplateVars(), | 104 | $this->initializeTemplateVars(), |
@@ -106,7 +110,7 @@ class BookmarkListController extends ShaarliVisitorController | |||
106 | 'result_count' => count($linksToDisplay), | 110 | 'result_count' => count($linksToDisplay), |
107 | 'search_term' => escape($searchTerm), | 111 | 'search_term' => escape($searchTerm), |
108 | 'search_tags' => escape($searchTags), | 112 | 'search_tags' => escape($searchTags), |
109 | 'search_tags_url' => array_map('urlencode', explode(' ', $searchTags)), | 113 | 'search_tags_url' => $searchTagsUrlEncoded, |
110 | 'visibility' => $visibility, | 114 | 'visibility' => $visibility, |
111 | 'links' => $linkDisp, | 115 | 'links' => $linkDisp, |
112 | ] | 116 | ] |
@@ -119,8 +123,9 @@ class BookmarkListController extends ShaarliVisitorController | |||
119 | return '[' . $tag . ']'; | 123 | return '[' . $tag . ']'; |
120 | }; | 124 | }; |
121 | $data['pagetitle'] .= ! empty($searchTags) | 125 | $data['pagetitle'] .= ! empty($searchTags) |
122 | ? implode(' ', array_map($bracketWrap, preg_split('/\s+/', $searchTags))) . ' ' | 126 | ? implode(' ', array_map($bracketWrap, tags_str2array($searchTags, $tagsSeparator))) . ' ' |
123 | : ''; | 127 | : '' |
128 | ; | ||
124 | $data['pagetitle'] .= '- '; | 129 | $data['pagetitle'] .= '- '; |
125 | } | 130 | } |
126 | 131 | ||