summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcheapie <no-email-for-you@example.com>2020-03-30 01:08:05 -0500
committercheapie <no-email-for-you@example.com>2020-03-30 01:08:05 -0500
commit13072c7d5927cf749b141a1d11800b12a7d71423 (patch)
tree021b24cc4a91cba6fc02f9501082e0a44268c890
parentd9fd360882529253e261fedd32abbcfe3ef5facd (diff)
downloaddigistuff-13072c7d5927cf749b141a1d11800b12a7d71423.tar
digistuff-13072c7d5927cf749b141a1d11800b12a7d71423.tar.gz
digistuff-13072c7d5927cf749b141a1d11800b12a7d71423.tar.bz2
digistuff-13072c7d5927cf749b141a1d11800b12a7d71423.tar.xz
digistuff-13072c7d5927cf749b141a1d11800b12a7d71423.zip
Fix unescaped strings
-rw-r--r--touchscreen.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/touchscreen.lua b/touchscreen.lua
index 6325f28..71191d5 100644
--- a/touchscreen.lua
+++ b/touchscreen.lua
@@ -216,7 +216,7 @@ digistuff.process_command = function (meta, data, msg)
if not msg.choices or type(msg.choices) ~= "table" or #msg.choices < 1 then
return
end
- local field = {type="dropdown",X=msg.X,Y=msg.Y,W=msg.W,H=msg.H,name=msg.name,selected_id=msg.selected_id,choices=msg.choices}
+ local field = {type="dropdown",X=msg.X,Y=msg.Y,W=msg.W,H=msg.H,name=minetest.formspec_escape(msg.name),selected_id=msg.selected_id,choices=msg.choices}
table.insert(data,field)
elseif msg.command == "addtextlist" then
for _,i in pairs({"X","Y","W","H","selected_id"}) do
@@ -233,7 +233,7 @@ digistuff.process_command = function (meta, data, msg)
if not msg.transparent or type(msg.transparent) ~= "boolean" then
msg.transparent = false
end
- local field = {type="textlist",X=msg.X,Y=msg.Y,W=msg.W,H=msg.H,name=msg.name,selected_id=msg.selected_id,listelements=msg.listelements,transparent=msg.transparent}
+ local field = {type="textlist",X=msg.X,Y=msg.Y,W=msg.W,H=msg.H,name=minetest.formspec_escape(msg.name),selected_id=msg.selected_id,listelements=msg.listelements,transparent=msg.transparent}
table.insert(data,field)
elseif msg.command == "lock" then
meta:set_int("locked",1)