]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - builtin/mainmenu_helper.lua
filterlist api cleanup
[dragonfireclient.git] / builtin / mainmenu_helper.lua
index f5a470b725ba72752ea32e7834bd0deb22bfe13a..25ad072fd43bf679e393ddc05aa09b32a0f12fad 100644 (file)
@@ -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