From df28324c34dbbcde8ac4859e8e94314d29e1a409 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 2 Nov 2024 01:02:12 +0100 Subject: Fix regex search for tags (#6972) https://github.com/FreshRSS/FreshRSS/issues/6949#issuecomment-2452363378 --- tests/app/Models/SearchTest.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/app') diff --git a/tests/app/Models/SearchTest.php b/tests/app/Models/SearchTest.php index 403c2c98e..8ff98a8e8 100644 --- a/tests/app/Models/SearchTest.php +++ b/tests/app/Models/SearchTest.php @@ -525,6 +525,11 @@ class SearchTest extends PHPUnit\Framework\TestCase { '(NOT e.title ~ ? AND NOT e.content ~ ? )', ['^ab$', '^ab$'] ], + [ + '#/^a(b|c)$/im', + "(REPLACE(REPLACE(e.tags, ' #', '#'), '#', '\n') ~* ? )", + ['(?m)^a(b|c)$'] + ], [ // Not a regex 'inurl:https://example.net/test/', '(e.link LIKE ? )', -- cgit v1.2.3