mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Deprecate special handling of ${key}
syntax in metadata values (#12970)
This commit is contained in:
parent
3c7f26d937
commit
8817af07fb
6 changed files with 19 additions and 6 deletions
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue