diff --git a/builtin/common/misc_helpers.lua b/builtin/common/misc_helpers.lua index d2356b505..467f18804 100644 --- a/builtin/common/misc_helpers.lua +++ b/builtin/common/misc_helpers.lua @@ -254,7 +254,7 @@ local formspec_escapes = { } function core.formspec_escape(text) -- Use explicit character set instead of dot here because it doubles the performance - return text and text:gsub("[\\%[%];,]", formspec_escapes) + return text and string.gsub(text, "[\\%[%];,]", formspec_escapes) end