From 8817af07fb72fd78fb753fe5d069d0a65a79742f Mon Sep 17 00:00:00 2001 From: Jude Melton-Houghton Date: Thu, 24 Nov 2022 17:56:43 -0500 Subject: Deprecate special handling of `${key}` syntax in metadata values (#12970) --- builtin/common/misc_helpers.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'builtin') 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 -- cgit v1.2.3