1
0

formspec_escape stability improvement

* formspec_escape causes server crash, when text argument is a number.
  the `tostring(text)` prevents this
* backported https://github.com/MultiCraft/MultiCraft/pull/87
This commit is contained in:
mckaygerhard 2024-06-03 09:41:55 -04:00
parent ce35eb4122
commit 17cb07a366

View File

@ -254,6 +254,7 @@ end
function core.formspec_escape(text)
text = tostring(text)
if text ~= nil then
text = text:gsub("\\", "\\\\")
text = text:gsub("%]", "\\]")