get_article_filters: strip newlines from content before matching

This commit is contained in:
Andrew Dolgov 2012-11-20 21:27:53 +04:00
parent 72d1d0678e
commit d03ae73e93
1 changed files with 6 additions and 0 deletions

View File

@ -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":