diff --git a/builtin/common/misc_helpers.lua b/builtin/common/misc_helpers.lua index b7bd4d6a7..be19e5b51 100644 --- a/builtin/common/misc_helpers.lua +++ b/builtin/common/misc_helpers.lua @@ -254,6 +254,7 @@ end function core.formspec_escape(text) + text = tostring(text) if text ~= nil then text = text:gsub("\\", "\\\\") text = text:gsub("%]", "\\]")