From: Andrew Dolgov Date: Tue, 20 Nov 2012 17:27:53 +0000 (+0400) Subject: get_article_filters: strip newlines from content before matching X-Git-Tag: 1.6.2~20 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=d03ae73e932afbc7b84fb9393f6322acead9b6d4;p=tt-rss.git get_article_filters: strip newlines from content before matching --- diff --git a/include/rssfuncs.php b/include/rssfuncs.php index 8e58d1e1..d1e9e6e0 100644 --- a/include/rssfuncs.php +++ b/include/rssfuncs.php @@ -1388,9 +1388,15 @@ $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":