1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Fix serverlist not beeing escaped correctly

Always use address for server
Fix first (empty) element beeing selected after deleting last world
This commit is contained in:
sapier 2013-07-08 23:45:14 +02:00 committed by kwolekr
parent f419f66546
commit 39d03148e5
3 changed files with 16 additions and 19 deletions

View 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