From 57583a78964e4d6a7ee997f33d35b2cf017d5dc1 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Mon, 5 Mar 2007 16:40:10 +0000 Subject: [PATCH] allow \".\" in filter --- lam/lib/lists.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lam/lib/lists.inc b/lam/lib/lists.inc index a726c81a..d8c6338d 100644 --- a/lam/lib/lists.inc +++ b/lam/lib/lists.inc @@ -171,10 +171,11 @@ class lamList { if (isset($_POST["filter" . strtolower($this->attrArray[$i])])) { $foundFilter = $_POST["filter" . strtolower($this->attrArray[$i])]; } - if (isset($foundFilter) && eregi('^([0-9a-z _\\*\\$-])+$', $foundFilter)) { + if (isset($foundFilter) && eregi('^([0-9a-z _\\*\\$\\.-])+$', $foundFilter)) { $filter[$this->attrArray[$i]]['original'] = $foundFilter; $filter[$this->attrArray[$i]]['regex'] = $foundFilter; // replace special characters + $filter[$this->attrArray[$i]]['regex'] = str_replace('.', '\\.', $filter[$this->attrArray[$i]]['regex']); $filter[$this->attrArray[$i]]['regex'] = str_replace("*", "(.)*", $filter[$this->attrArray[$i]]['regex']); $filter[$this->attrArray[$i]]['regex'] = str_replace('$', '[$]', $filter[$this->attrArray[$i]]['regex']); // add string begin and end