aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/Controllers')
-rw-r--r--app/Controllers/tagController.php5
1 files changed, 5 insertions, 0 deletions
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);
+ }
}