]> git.wh0rd.org - tt-rss.git/commitdiff
get_article_filters: strip newlines from content before matching
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 20 Nov 2012 17:27:53 +0000 (21:27 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 20 Nov 2012 17:27:53 +0000 (21:27 +0400)
include/rssfuncs.php

index 8e58d1e1848def7ddac1a3cc2770bb0e8398ed10..d1e9e6e01612ab7398f02a7426951cd8b81c5747 100644 (file)
                                        $match = @preg_match("/$reg_exp/i", $title);
                                        break;
                                case "content":
+                                       // we don't need to deal with multiline regexps
+                                       $content = preg_replace("/[\r\n\t]/", "", $content);
+
                                        $match = @preg_match("/$reg_exp/i", $content);
                                        break;
                                case "both":
+                                       // we don't need to deal with multiline regexps
+                                       $content = preg_replace("/[\r\n\t]/", "", $content);
+
                                        $match = (@preg_match("/$reg_exp/i", $title) || @preg_match("/$reg_exp/i", $content));
                                        break;
                                case "link":