mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 21:35:56 +00:00
Match each tag separately against user filter regular expression
Each article's tag should be matched against user filter regular expression separately. Current matching confuses when you want to match an exact tag. You suppose to write "^tag$", bug now have to write "(^|,)tag(,|$)" which is very inconvenient and requires knowledge about how do you process this matching.
This commit is contained in:
@@ -1271,8 +1271,12 @@
|
||||
$match = @preg_match("/$reg_exp/i", $author);
|
||||
break;
|
||||
case "tag":
|
||||
$tag_string = join(",", $tags);
|
||||
$match = @preg_match("/$reg_exp/i", $tag_string);
|
||||
foreach ($tags as $tag) {
|
||||
if (@preg_match("/$reg_exp/i", $tag)) {
|
||||
$match = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user