summaryrefslogtreecommitdiff
path: root/plugins/auto_assign_labels
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2018-02-23 13:31:08 +0300
committerAndrew Dolgov <[email protected]>2018-02-23 13:31:08 +0300
commit7e6bb21ff59167c75602b71157d679f23306c572 (patch)
tree0707bdc645929a59915753140e5d013cc38e98eb /plugins/auto_assign_labels
parentbcdbfa7c675832704095fd65157bcc421becbf95 (diff)
auto_assign_labels: pass delimiter to preg_quote() to escape slashes properly
Diffstat (limited to 'plugins/auto_assign_labels')
-rwxr-xr-x[-rw-r--r--]plugins/auto_assign_labels/init.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/auto_assign_labels/init.php b/plugins/auto_assign_labels/init.php
index cc70e2dff..3fa4ad8c0 100644..100755
--- 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
+}