Add missing formspec escape (#34)

* fix missing formspec escape

* formspec_escape at the correct place
This commit is contained in:
tour 2024-01-23 15:33:02 +01:00 committed by GitHub
parent 31a98e2c9b
commit b24feb4073
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,7 +4,7 @@ local function initialize_data(meta)
local commands = meta:get_string("commands") local commands = meta:get_string("commands")
meta:set_string("formspec", meta:set_string("formspec",
"invsize[9,5;]" .. "invsize[9,5;]" ..
"textarea[0.5,0.5;8.5,4;commands;Commands;"..commands.."]" .. "textarea[0.5,0.5;8.5,4;commands;Commands;"..minetest.formspec_escape(commands).."]" ..
"label[1,3.8;@nearest is replaced by the nearest player name ("..tostring(NEAREST_MAX_DISTANCE).." nodes max for the nearest distance)".."]" .. "label[1,3.8;@nearest is replaced by the nearest player name ("..tostring(NEAREST_MAX_DISTANCE).." nodes max for the nearest distance)".."]" ..
"button_exit[3.3,4.5;2,1;submit;Submit]") "button_exit[3.3,4.5;2,1;submit;Submit]")
local owner = meta:get_string("owner") local owner = meta:get_string("owner")