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