Support numbers as arguments by using `string.gsub(text, ...)` instead of `text:gsub(...)` which will coerce `text` to a string
}
function core.formspec_escape(text)
-- Use explicit character set instead of dot here because it doubles the performance
}
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)