summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2012-11-20 21:27:53 +0400
committerAndrew Dolgov <[email protected]>2012-11-20 21:27:53 +0400
commitd03ae73e932afbc7b84fb9393f6322acead9b6d4 (patch)
tree010da570aa1ace2a5fe21238aace34087be52353 /include
parent72d1d0678ed7f3c34c87fb14c855651ee6a8cd38 (diff)
get_article_filters: strip newlines from content before matching
Diffstat (limited to 'include')
-rw-r--r--include/rssfuncs.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/rssfuncs.php b/include/rssfuncs.php
index 8e58d1e18..d1e9e6e01 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":