From 1c7c5d571de3db6d739b9b2006e17bc6a8d9408c Mon Sep 17 00:00:00 2001 From: sapier Date: Tue, 9 Jul 2013 21:54:30 +0200 Subject: Fix serverlist --- builtin/mainmenu_helper.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'builtin/mainmenu_helper.lua') 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 -- cgit v1.2.3