Add formspec escaping to subgame list in create world dialog (#5808)
authorrubenwardy <rubenwardy@gmail.com>
Wed, 24 May 2017 05:45:23 +0000 (06:45 +0100)
committerLoïc Blot <nerzhul@users.noreply.github.com>
Wed, 24 May 2017 05:45:23 +0000 (07:45 +0200)
builtin/mainmenu/gamemgr.lua

index b6faa71d9077aa1f49ad7608b4d0ada01640be02..fd6025fcd2001fcc1355c0c69bda6486810a101e 100644 (file)
@@ -68,10 +68,10 @@ end
 function gamemgr.gamelist()
        local retval = ""
        if #gamemgr.games > 0 then
-               retval = retval .. gamemgr.games[1].name
+               retval = retval .. core.formspec_escape(gamemgr.games[1].name)
 
                for i=2,#gamemgr.games,1 do
-                       retval = retval .. "," .. gamemgr.games[i].name
+                       retval = retval .. "," .. core.formspec_escape(gamemgr.games[i].name)
                end
        end
        return retval