diff options
author | Wuzzy <almikes@aol.com> | 2016-08-01 02:58:42 +0200 |
---|---|---|
committer | Wuzzy <almikes@aol.com> | 2016-08-01 02:58:42 +0200 |
commit | 2f4c6335d46cf40b7f3ab6b5f0867a06550c11f2 (patch) | |
tree | be2de18a0b0f0e02baada7445fd0164cba2eb3d5 /init.lua | |
parent | 96286d3618997b79168348e90fef2fef30940639 (diff) |
Escape more formspec strings
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -278,9 +278,9 @@ doc.new_category("nodes", { local gstring, gcount = groups_to_string(data.def.groups) if gstring ~= nil then if gcount == 1 then - formstring = formstring .. "This block belongs to the "..gstring.." group.\n" + formstring = formstring .. "This block belongs to the "..minetest.formspec_escape(gstring).." group.\n" else - formstring = formstring .. "This block belongs to these groups: "..gstring..".\n" + formstring = formstring .. "This block belongs to these groups: "..minetest.formspec_escape(gstring)..".\n" end end @@ -399,8 +399,8 @@ doc.new_category("tools", { else formstring = formstring .. "item_image[11,0;1,1;"..data.itemstring.."]" end - formstring = formstring .. "textarea[0.25,1;10,8;;Description: "..longdesc.."\n\n" - formstring = formstring .. "Usage: "..usagehelp .. "\n\n" + formstring = formstring .. "textarea[0.25,1;10,8;;Description: "..minetest.formspec_escape(longdesc).."\n\n" + formstring = formstring .. "Usage: "..minetest.formspec_escape(usagehelp).. "\n\n" formstring = formstring .. "Maximum stack size: "..data.def.stack_max.. "\n" local yesno = function(bool) @@ -449,9 +449,9 @@ doc.new_category("tools", { local gstring, gcount = groups_to_string(data.def.groups) if gstring ~= nil then if gcount == 1 then - formstring = formstring .. "This tool belongs to the "..gstring.." group.\n" + formstring = formstring .. "This tool belongs to the "..minetest.formspec_escape(gstring).." group.\n" else - formstring = formstring .. "This tool belongs to these groups: "..gstring..".\n" + formstring = formstring .. "This tool belongs to these groups: "..minetest.formspec_escape(gstring)..".\n" end end @@ -478,8 +478,8 @@ doc.new_category("craftitems", { local longdesc = data.longdesc or "N/A" local usagehelp = data.usagehelp or "N/A" local formstring = "item_image[11,0;1,1;"..data.itemstring.."]" - formstring = formstring .. "textarea[0.25,1;10,8;;Description: "..longdesc.."\n\n" - formstring = formstring .. "Usage: "..usagehelp .. "\n\n" + formstring = formstring .. "textarea[0.25,1;10,8;;Description: "..minetest.formspec_escape(longdesc).."\n\n" + formstring = formstring .. "Usage: "..minetest.formspec_escape(usagehelp).. "\n\n" formstring = formstring .. "Maximum stack size: "..data.def.stack_max.. "\n" local yesno = function(bool) @@ -520,9 +520,9 @@ doc.new_category("craftitems", { local gstring, gcount = groups_to_string(data.def.groups) if gstring ~= nil then if gcount == 1 then - formstring = formstring .. "This item belongs to the "..gstring.." group.\n" + formstring = formstring .. "This item belongs to the "..minetest.formspec_escape(gstring).." group.\n" else - formstring = formstring .. "This item belongs to these groups: "..gstring..".\n" + formstring = formstring .. "This item belongs to these groups: "..minetest.formspec_escape(gstring)..".\n" end end |