From d03ae73e932afbc7b84fb9393f6322acead9b6d4 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 20 Nov 2012 21:27:53 +0400 Subject: [PATCH] get_article_filters: strip newlines from content before matching --- include/rssfuncs.php | 6 ++++++ 1 file changed, 6 insertions(+) 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": -- 2.39.5