summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWuzzy <almikes@aol.com>2015-05-16 23:24:41 +0200
committerWuzzy <almikes@aol.com>2015-05-16 23:24:41 +0200
commit0c4470cfd76ed9bc7855c27941f5b042e69bf893 (patch)
tree8025f3d0aab3d0841422b5f88a94e64819921989
parent4fc84edb8a76a9e512dfc7d4fb80dbd1011e1b69 (diff)
Apply formspec escaping
-rw-r--r--init.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/init.lua b/init.lua
index 2e55a4e..85e8a48 100644
--- a/init.lua
+++ b/init.lua
@@ -45,7 +45,7 @@ function doc.formspec_main()
local y = 1
local formstring = "label[0,0;Available help topics:]"
for id,data in pairs(doc.data.categories) do
- local button = "button[0,"..y..";3,1;doc_button_category_"..id..";"..data.def.name.."]"
+ local button = "button[0,"..y..";3,1;doc_button_category_"..id..";"..minetest.formspec_escape(data.def.name).."]"
formstring = formstring .. button
y = y + 1
end
@@ -61,7 +61,7 @@ function doc.generate_entry_list(cid, playername)
local entries = doc.get_sorted_entry_names(cid)
for i=1, #entries do
table.insert(doc.data.players[playername].entry_ids, entries[i].eid)
- entry_textlist = entry_textlist .. entries[i].name .. ","
+ entry_textlist = entry_textlist .. minetest.formspec_escape(entries[i].name) .. ","
counter = counter + 1
end
if counter >= 1 then