aboutsummaryrefslogtreecommitdiff
path: root/builtin/mainmenu.lua
diff options
context:
space:
mode:
authorNovatux <nathanael.courant@laposte.net>2013-08-14 20:21:39 +0200
committerKahrl <kahrl@gmx.net>2013-08-15 22:12:51 +0200
commit7921fe2cd1b284b35c28419fdf78873af456fded (patch)
tree8406671ea8106a6bef4ee384bf2a17f3dc384d15 /builtin/mainmenu.lua
parenta97c085e9e6f5e37c316aa5390f7cb05ad6bcacc (diff)
downloadhax-minetest-server-7921fe2cd1b284b35c28419fdf78873af456fded.tar.gz
hax-minetest-server-7921fe2cd1b284b35c28419fdf78873af456fded.zip
Fix formspec escaping, add escaping to info.txt for texture packs.
Diffstat (limited to 'builtin/mainmenu.lua')
-rw-r--r--builtin/mainmenu.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/builtin/mainmenu.lua b/builtin/mainmenu.lua
index 926f3f2d9..5eb1a73db 100644
--- a/builtin/mainmenu.lua
+++ b/builtin/mainmenu.lua
@@ -39,11 +39,11 @@ function menu.render_favorite(spec,render_details)
local text = ""
if spec.name ~= nil then
- text = text .. fs_escape_string(spec.name:trim())
+ text = text .. engine.formspec_escape(spec.name:trim())
-- if spec.description ~= nil and
--- fs_escape_string(spec.description):trim() ~= "" then
--- text = text .. " (" .. fs_escape_string(spec.description) .. ")"
+-- engine.formspec_escape(spec.description):trim() ~= "" then
+-- text = text .. " (" .. engine.formspec_escape(spec.description) .. ")"
-- end
else
if spec.address ~= nil then
@@ -93,7 +93,7 @@ function menu.render_favorite(spec,render_details)
string.format("%03d",spec.clients_max) .. " "
end
- return playercount .. fs_escape_string(details) .. text
+ return playercount .. engine.formspec_escape(details) .. text
end
--------------------------------------------------------------------------------
@@ -900,7 +900,7 @@ function tabbuilder.tab_multiplayer()
if menu.fav_selected ~= nil and
menu.favorites[menu.fav_selected].description ~= nil then
retval = retval ..
- fs_escape_string(menu.favorites[menu.fav_selected].description,true)
+ engine.formspec_escape(menu.favorites[menu.fav_selected].description,true)
end
retval = retval ..
@@ -1040,7 +1040,7 @@ function tabbuilder.tab_TP()
menu.render_TP_list(TPlist) ..
";" .. index .. "]" ..
"image[0.65,0.25;4.0,3.7;"..(menu.TPscreen or no_screenshot).."]"..
- "textarea[1.0,3.25;3.7,1.5;;"..(menu.TPinfo or "")..";]"
+ "textarea[1.0,3.25;3.7,1.5;;"..engine.formspec_escape(menu.TPinfo or "")..";]"
end
--------------------------------------------------------------------------------