Merge branch 'main' into render-update

This commit is contained in:
MihailRis 2025-04-27 18:23:47 +03:00
commit b692e8446d

View File

@ -228,11 +228,14 @@ function gui.template(name, params)
local text = file.read(file.find("layouts/templates/"..name..".xml"))
text = text:gsub("%%{([^}]+)}", function(n)
local s = params[n]
if s == nil then
return
end
if type(s) ~= "string" then
return tostring(s)
end
if #s == 0 then
return
return ''
end
local e = string.escape(s)
return e:sub(2, #e-1)