]> git.wh0rd.org Git - tt-rss.git/commitdiff
apply filters and detect labels based on article content without tags
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 30 Oct 2012 09:09:38 +0000 (13:09 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 30 Oct 2012 09:09:38 +0000 (13:09 +0400)
include/rssfuncs.php

index 1e2feb3cba46ed611cdcc548ee35a0bf9d7e3723..e90b3cc079fa74efa291da2865b69c83243fc1d3 100644 (file)
                                        /* Collect article tags here so we could filter by them: */
 
                                        $article_filters = get_article_filters($filters, $entry_title,
-                                               $entry_content, $entry_link, $entry_timestamp, $entry_author,
+                                               strip_tags($entry_content), $entry_link, $entry_timestamp, $entry_author,
                                                $entry_tags);
 
                                        if ($debug_enabled) {
                                        foreach ($labels as $label) {
                                                $caption = $label["caption"];
 
-                                               if (preg_match("/\b$caption\b/i", "$tags_str $entry_content $entry_title")) {
+                                               if (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);
                                                        }