]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - builtin/common/misc_helpers.lua
core.formspec_escape: Restore backwards compat
[dragonfireclient.git] / builtin / common / misc_helpers.lua
index d2356b50572cedd04e6923ec3b796ea67acba9cf..467f188049614df3a40328bb6ae58095e4d6bd10 100644 (file)
@@ -254,7 +254,7 @@ local formspec_escapes = {
 }
 function core.formspec_escape(text)
        -- Use explicit character set instead of dot here because it doubles the performance
-       return text and text:gsub("[\\%[%];,]", formspec_escapes)
+       return text and string.gsub(text, "[\\%[%];,]", formspec_escapes)
 end