aboutsummaryrefslogtreecommitdiff
path: root/app/Models/BooleanSearch.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2024-11-02 01:02:12 +0100
committerGravatar GitHub <noreply@github.com> 2024-11-02 01:02:12 +0100
commitdf28324c34dbbcde8ac4859e8e94314d29e1a409 (patch)
tree7d082e62af4e163486146bab804baa1dc4f7a534 /app/Models/BooleanSearch.php
parentb7bff9484fe313e8503ed4effae839573b3a8539 (diff)
Fix regex search for tags (#6972)
https://github.com/FreshRSS/FreshRSS/issues/6949#issuecomment-2452363378
Diffstat (limited to 'app/Models/BooleanSearch.php')
-rw-r--r--app/Models/BooleanSearch.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/Models/BooleanSearch.php b/app/Models/BooleanSearch.php
index 62d4cf9c1..50f8feea1 100644
--- a/app/Models/BooleanSearch.php
+++ b/app/Models/BooleanSearch.php
@@ -137,7 +137,7 @@ class FreshRSS_BooleanSearch {
* Temporarily escape parentheses used in regex expressions.
*/
public static function escapeRegexParentheses(string $input): string {
- return preg_replace_callback('#(?<=[\\s(:!-]|^)(?<![\\\\])/.+?(?<!\\\\)/[im]*#',
+ return preg_replace_callback('%(?<=[\\s(:#!-]|^)(?<![\\\\])/.+?(?<!\\\\)/[im]*%',
fn(array $matches): string => str_replace(['(', ')'], ['\\u0028', '\\u0029'], $matches[0]),
$input
) ?? '';