forked from minetest-mods/unified_inventory
Fix filter sanitizing
This commit is contained in:
parent
04600f64d8
commit
002e9931ab
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user