diff --git a/app/Controllers/tagController.php b/app/Controllers/tagController.php index cb3f164f5..68047656e 100644 --- a/app/Controllers/tagController.php +++ b/app/Controllers/tagController.php @@ -204,4 +204,9 @@ class FreshRSS_tag_Controller extends FreshRSS_ActionController { $tagDAO = FreshRSS_Factory::createTagDao(); $this->view->tags = $tagDAO->listTags(precounts: true); } + + public static function escapeForSearch(string $tag): string { + $tag = htmlspecialchars_decode($tag, ENT_QUOTES); + return str_replace([' ', '(', ')'], ['+', '\\(', '\\)'], $tag); + } } diff --git a/app/views/helpers/index/normal/entry_bottom.phtml b/app/views/helpers/index/normal/entry_bottom.phtml index f3c363275..380d00318 100644 --- a/app/views/helpers/index/normal/entry_bottom.phtml +++ b/app/views/helpers/index/normal/entry_bottom.phtml @@ -56,7 +56,8 @@
  • ❌ diff --git a/app/views/helpers/index/tags.phtml b/app/views/helpers/index/tags.phtml index 2c5804372..ffb2d6f72 100644 --- a/app/views/helpers/index/tags.phtml +++ b/app/views/helpers/index/tags.phtml @@ -11,11 +11,13 @@