From 0b17717cdbb95c20e9d91be370f97e92c706195c Mon Sep 17 00:00:00 2001 From: ChimneySwift Date: Sat, 10 Nov 2018 23:46:51 +1000 Subject: [PATCH] Escape special characters when searching the server list (#7842) Simple fix to stop searching for "[" or other special characters causing a crash. --- builtin/mainmenu/tab_online.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/builtin/mainmenu/tab_online.lua b/builtin/mainmenu/tab_online.lua index 8e88a77..a057d09 100644 --- a/builtin/mainmenu/tab_online.lua +++ b/builtin/mainmenu/tab_online.lua @@ -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