Allow slashes in filter regular expressions

User's regular expressions need escaping before passing them to
preg_match()
This commit is contained in:
Dmitry Konishchev 2013-04-26 15:46:48 +04:00
parent 8cefe38a0a
commit ffa1bd7b19

View file

@ -1242,7 +1242,7 @@
foreach ($filter["rules"] as $rule) { foreach ($filter["rules"] as $rule) {
$match = false; $match = false;
$reg_exp = $rule["reg_exp"]; $reg_exp = str_replace('/', '\/', $rule["reg_exp"]);
$rule_inverse = $rule["inverse"]; $rule_inverse = $rule["inverse"];
if (!$reg_exp) if (!$reg_exp)