aboutsummaryrefslogtreecommitdiff
path: root/builtin/common/misc_helpers.lua
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/common/misc_helpers.lua')
-rw-r--r--builtin/common/misc_helpers.lua5
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