Escape microcontroller code in formspec

This commit is contained in:
khonkhortisan 2013-08-29 14:14:04 -07:00
parent d0fdefb5a6
commit 75ca00f51e

View File

@ -116,7 +116,7 @@ minetest.register_node(nodename, {
meta:set_string("code", fields.code) meta:set_string("code", fields.code)
meta:set_string("formspec", "size[9,2.5]".. meta:set_string("formspec", "size[9,2.5]"..
"field[0.256,-0.2;9,2;code;Code:;"..fields.code.."]".. "field[0.256,-0.2;9,2;code;Code:;"..minetest.formspec_escape(fields.code).."]"..
"button[0 ,0.2;1.5,3;band;AND]".. "button[0 ,0.2;1.5,3;band;AND]"..
"button[1.5,0.2;1.5,3;bxor;XOR]".. "button[1.5,0.2;1.5,3;bxor;XOR]"..
"button[3 ,0.2;1.5,3;bnot;NOT]".. "button[3 ,0.2;1.5,3;bnot;NOT]"..