diff options
author | Jude Melton-Houghton <jwmhjwmh@gmail.com> | 2022-11-24 17:56:43 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-24 17:56:43 -0500 |
commit | 8817af07fb72fd78fb753fe5d069d0a65a79742f (patch) | |
tree | 57b4fc5c96aa4065479a79bcb6001075f9091b72 /builtin/common | |
parent | 3c7f26d93721d8d86ca5d9e894e8652b1e2a8672 (diff) | |
download | minetest-8817af07fb72fd78fb753fe5d069d0a65a79742f.tar.xz |
Deprecate special handling of `${key}` syntax in metadata values (#12970)
Diffstat (limited to 'builtin/common')
-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 |