From 2a9ee63269834052d353df555e921c00bbe6ae46 Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Mon, 16 Mar 2015 17:12:08 -0500 Subject: [PATCH] filter: Trim match values when saving rules This will help when saving rules with trailing spaces for instance, which may make things not match when visually the administrator would otherwise expect the filter to match. --- include/class.filter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/class.filter.php b/include/class.filter.php index b05a448ce..70a5f2718 100644 --- a/include/class.filter.php +++ b/include/class.filter.php @@ -456,7 +456,7 @@ class Filter { else //for everything-else...we assume it's valid. $rules[]=array('what'=>$vars["rule_w$i"], - 'how'=>$vars["rule_h$i"],'val'=>$vars["rule_v$i"]); + 'how'=>$vars["rule_h$i"],'val'=>trim($vars["rule_v$i"])); }elseif($vars["rule_v$i"]) { $errors["rule_$i"]=__('Incomplete selection'); } -- GitLab