mirror of
https://github.com/minetest/minetest.git
synced 2024-11-27 01:53:45 +01:00
Escape special characters when searching the server list (#7842)
Simple fix to stop searching for "[" or other special characters causing a crash.
This commit is contained in:
parent
57a2f3e4c4
commit
6c42ebfafa
@ -256,6 +256,7 @@ local function main_button_handler(tabview, fields, name, tabdata)
|
||||
-- setup the keyword list
|
||||
local keywords = {}
|
||||
for word in input:gmatch("%S+") do
|
||||
word = word:gsub("(%W)", "%%%1")
|
||||
table.insert(keywords, word)
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user