Escape special characters when searching the server list

* fix issue from https://github.com/minetest/minetest/issues/7857
* Simple fix to stop searching for "[" or other special characters causing a crash.
This commit is contained in:
mckaygerhard 2023-01-06 14:08:38 -04:00
parent ec7fc8c94c
commit d78faf31f1

View File

@ -254,6 +254,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