Fix filter sanitizing

This commit is contained in:
ShadowNinja 2013-10-03 12:43:05 -04:00
parent 04600f64d8
commit 002e9931ab
1 changed files with 4 additions and 3 deletions

View File

@ -93,9 +93,10 @@ function unified_inventory.apply_filter(player, filter)
local size = 0 local size = 0
local lfilter = string.lower(filter) local lfilter = string.lower(filter)
if lfilter ~= "" then if lfilter ~= "" then
for i=1, lfilter:len() do for c in lfilter:gmatch(".") do
if lfilter:sub(i, i) == '[' then if c == '[' or c == ']' or c == '{' or c == '}' or
str_temp1 = "" c == '(' or c == ')' or c == '%' then
lfilter = ""
break break
end end
end end