diff options
Diffstat (limited to 'builtin/mainmenu_helper.lua')
-rw-r--r-- | builtin/mainmenu_helper.lua | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/builtin/mainmenu_helper.lua b/builtin/mainmenu_helper.lua index a204b4a37..25ad072fd 100644 --- a/builtin/mainmenu_helper.lua +++ b/builtin/mainmenu_helper.lua @@ -77,9 +77,11 @@ function fs_escape_string(text) text = newtext end - text = text:gsub("%[","\\%[") - text = text:gsub("]","\\]") - text = text:gsub(";","\\;") + text = string.gsub(text,"\\","\\\\") + text = string.gsub(text,"%]","\\]") + text = string.gsub(text,"%[","\\[") + text = string.gsub(text,";","\\;") + text = string.gsub(text,",","\\,") end return text end |