]> git.wh0rd.org Git - tt-rss.git/commitdiff
Allow slashes in filter regular expressions
authorDmitry Konishchev <konishchev@gmail.com>
Fri, 26 Apr 2013 11:46:48 +0000 (15:46 +0400)
committerDmitry Konishchev <konishchev@gmail.com>
Fri, 26 Apr 2013 11:46:48 +0000 (15:46 +0400)
User's regular expressions need escaping before passing them to
preg_match()

include/rssfuncs.php

index 0cd41dc059c8510a94b02d4c2357c00b0962a089..3c77167215f59c23d75c9589d639f1f2938353bb 100644 (file)
 
                        foreach ($filter["rules"] as $rule) {
                                $match = false;
-                               $reg_exp = $rule["reg_exp"];
+                               $reg_exp = str_replace('/', '\/', $rule["reg_exp"]);
                                $rule_inverse = $rule["inverse"];
 
                                if (!$reg_exp)