summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShadowNinja <noreply@gmail.com>2013-10-03 12:43:05 -0400
committerShadowNinja <noreply@gmail.com>2013-10-03 12:43:05 -0400
commit002e9931ab46bdadee827c1114f9a4f48bbf3562 (patch)
tree84dd6cd10a4ded9e0ab1eb708f8cf793857b3c41
parent04600f64d879f87f54d4dd7b9654a7a921149a44 (diff)
Fix filter sanitizing
-rw-r--r--internal.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/internal.lua b/internal.lua
index 76a242b..cad5a5d 100644
--- a/internal.lua
+++ b/internal.lua
@@ -93,9 +93,10 @@ function unified_inventory.apply_filter(player, filter)
local size = 0
local lfilter = string.lower(filter)
if lfilter ~= "" then
- for i=1, lfilter:len() do
- if lfilter:sub(i, i) == '[' then
- str_temp1 = ""
+ for c in lfilter:gmatch(".") do
+ if c == '[' or c == ']' or c == '{' or c == '}' or
+ c == '(' or c == ')' or c == '%' then
+ lfilter = ""
break
end
end