aboutsummaryrefslogtreecommitdiff
path: root/builtin/mainmenu_helper.lua
diff options
context:
space:
mode:
authorsapier <Sapier at GMX dot net>2013-07-09 21:54:30 +0200
committerPilzAdam <pilzadam@minetest.net>2013-07-09 22:55:39 +0200
commit1c7c5d571de3db6d739b9b2006e17bc6a8d9408c (patch)
tree50ee31e14f646a80ef1424e778cf9be220680cb3 /builtin/mainmenu_helper.lua
parente3b7c8e0cc66c0ab9a87dc6626bff9a9fac3eda8 (diff)
downloadminetest-1c7c5d571de3db6d739b9b2006e17bc6a8d9408c.tar.gz
minetest-1c7c5d571de3db6d739b9b2006e17bc6a8d9408c.tar.bz2
minetest-1c7c5d571de3db6d739b9b2006e17bc6a8d9408c.zip
Fix serverlist
Diffstat (limited to 'builtin/mainmenu_helper.lua')
-rw-r--r--builtin/mainmenu_helper.lua8
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