summaryrefslogtreecommitdiff
path: root/builtin/mainmenu_helper.lua
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2013-07-08 20:21:09 -0400
committerkwolekr <kwolekr@minetest.net>2013-07-08 20:21:09 -0400
commite1a13608d85818cae8543e72f78659dcdfa99fc1 (patch)
tree3b91f76a2117732f7ce970b07932dac5db5df143 /builtin/mainmenu_helper.lua
parenteedb29346e38105f4da2a39536542d9242c70b8d (diff)
downloadminetest-e1a13608d85818cae8543e72f78659dcdfa99fc1.tar.gz
minetest-e1a13608d85818cae8543e72f78659dcdfa99fc1.tar.bz2
minetest-e1a13608d85818cae8543e72f78659dcdfa99fc1.zip
Revert "Fix serverlist not beeing escaped correctly"
This reverts commit 39d03148e5d98ef5f9a31b131a79ff2bbd71a877.
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