mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 17:15:55 +00:00
auto_assign_labels: pass delimiter to preg_quote() to escape slashes properly
This commit is contained in:
2
plugins/auto_assign_labels/init.php
Normal file → Executable file
2
plugins/auto_assign_labels/init.php
Normal file → Executable file
@@ -38,7 +38,7 @@ class Auto_Assign_Labels extends Plugin {
|
|||||||
$tags_str = join(",", $article["tags"]);
|
$tags_str = join(",", $article["tags"]);
|
||||||
|
|
||||||
foreach ($labels as $label) {
|
foreach ($labels as $label) {
|
||||||
$caption = preg_quote($label[1]);
|
$caption = preg_quote($label[1], "/");
|
||||||
|
|
||||||
if ($caption && preg_match("/\b$caption\b/i", "$tags_str " . strip_tags($article["content"]) . " " . $article["title"])) {
|
if ($caption && preg_match("/\b$caption\b/i", "$tags_str " . strip_tags($article["content"]) . " " . $article["title"])) {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user