From 60dd22d3b3916f5113954fc1472b1658c3c4245f Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Tue, 22 Oct 2024 16:00:07 +0200 Subject: Allow regex parentheses (#6926) * Allow regex parentheses While waiting for a new better search parser, auto-escape parentheses in regex expressions to allow them like in `/^(ab|cd)/` * Allow escaped parenthesis in regex * A couple more tests --- app/Models/Search.php | 1 + 1 file changed, 1 insertion(+) (limited to 'app/Models/Search.php') diff --git a/app/Models/Search.php b/app/Models/Search.php index 0e2f5da6f..45fa742be 100644 --- a/app/Models/Search.php +++ b/app/Models/Search.php @@ -94,6 +94,7 @@ class FreshRSS_Search { public function __construct(string $input) { $input = self::cleanSearch($input); $input = self::unescape($input); + $input = FreshRSS_BooleanSearch::unescapeRegexParentheses($input); $this->raw_input = $input; $input = $this->parseNotEntryIds($input); -- cgit v1.2.3