From: Andrew Dolgov Date: Fri, 23 Feb 2018 10:31:08 +0000 (+0300) Subject: auto_assign_labels: pass delimiter to preg_quote() to escape slashes properly X-Git-Tag: 18.8~63 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=7e6bb21ff59167c75602b71157d679f23306c572;p=tt-rss.git auto_assign_labels: pass delimiter to preg_quote() to escape slashes properly --- diff --git a/plugins/auto_assign_labels/init.php b/plugins/auto_assign_labels/init.php old mode 100644 new mode 100755 index cc70e2df..3fa4ad8c --- a/plugins/auto_assign_labels/init.php +++ b/plugins/auto_assign_labels/init.php @@ -38,7 +38,7 @@ class Auto_Assign_Labels extends Plugin { $tags_str = join(",", $article["tags"]); 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"])) { @@ -54,4 +54,4 @@ class Auto_Assign_Labels extends Plugin { function api_version() { return 2; } -} \ No newline at end of file +}