]> git.wh0rd.org - tt-rss.git/blobdiff - include/rssfuncs.php
updater: add basic support for migrating feed icons
[tt-rss.git] / include / rssfuncs.php
index 55c0baa4fdb627b6259c896ef803887d04391a24..92bfaa02384e8d86242c87f1745c1e248dfdb320 100644 (file)
                                        }
 
                                        foreach ($labels as $label) {
-                                               $caption = $label["caption"];
+                                               $caption = preg_quote($label["caption"]);
 
-                                               if (preg_match("/\b$caption\b/i", "$tags_str " . strip_tags($entry_content) . " $entry_title")) {
+                                               if ($caption && preg_match("/\b$caption\b/i", "$tags_str " . strip_tags($entry_content) . " $entry_title")) {
                                                        if (!labels_contains_caption($article_labels, $caption)) {
                                                                label_add_article($link, $entry_ref_id, $caption, $owner_uid);
                                                        }