diff options
Diffstat (limited to 'builtin/common/misc_helpers.lua')
-rw-r--r-- | builtin/common/misc_helpers.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin/common/misc_helpers.lua b/builtin/common/misc_helpers.lua index 720df3998..1a2b9500a 100644 --- a/builtin/common/misc_helpers.lua +++ b/builtin/common/misc_helpers.lua @@ -250,11 +250,12 @@ local formspec_escapes = { ["["] = "\\[", ["]"] = "\\]", [";"] = "\\;", - [","] = "\\," + [","] = "\\,", + ["$"] = "\\$", } function core.formspec_escape(text) -- Use explicit character set instead of dot here because it doubles the performance - return text and string.gsub(text, "[\\%[%];,]", formspec_escapes) + return text and string.gsub(text, "[\\%[%];,$]", formspec_escapes) end |