summaryrefslogtreecommitdiffstats
path: root/Server
diff options
context:
space:
mode:
authorNiLSPACE <niels.breuker@hotmail.nl>2020-10-17 14:10:48 +0200
committerNiLSPACE <niels.breuker@hotmail.nl>2020-10-17 14:10:48 +0200
commitb7c3ad80966d3532468c40bd1d8355aa1841fae8 (patch)
treeb975fb396b612fca836988aa88b8df0a2b777b96 /Server
parentAdded ability to register webadmin pages through Info.lua (diff)
downloadcuberite-b7c3ad80966d3532468c40bd1d8355aa1841fae8.tar
cuberite-b7c3ad80966d3532468c40bd1d8355aa1841fae8.tar.gz
cuberite-b7c3ad80966d3532468c40bd1d8355aa1841fae8.tar.bz2
cuberite-b7c3ad80966d3532468c40bd1d8355aa1841fae8.tar.lz
cuberite-b7c3ad80966d3532468c40bd1d8355aa1841fae8.tar.xz
cuberite-b7c3ad80966d3532468c40bd1d8355aa1841fae8.tar.zst
cuberite-b7c3ad80966d3532468c40bd1d8355aa1841fae8.zip
Diffstat (limited to 'Server')
-rw-r--r--Server/Plugins/InfoReg.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/Server/Plugins/InfoReg.lua b/Server/Plugins/InfoReg.lua
index 74e1196af..54cab4ab0 100644
--- a/Server/Plugins/InfoReg.lua
+++ b/Server/Plugins/InfoReg.lua
@@ -233,10 +233,14 @@ end
local function CompileView(a_Content)
content = 'return table.concat({[===[' .. a_Content .. ']===]})';
content = content:gsub("%{=%{(.-)%}=%}", function(logic)
+ logic = logic
+ :gsub("<>(.-)</>", "table.insert(__RESULTING_CONTENT__, [===[%1]===])")
+ :gsub("%{%{(.-)%}%}", "table.insert(__RESULTING_CONTENT__, cWebAdmin:GetHTMLEscapedString(%1))");
+
return [[]===], (
function()
local __RESULTING_CONTENT__ = {};
- ]] .. logic:gsub("%{%{(.-)%}%}", "table.insert(__RESULTING_CONTENT__, cWebAdmin:GetHTMLEscapedString(%1))") .. [[
+ ]] .. logic .. [[
return table.concat(__RESULTING_CONTENT__)
end
)(), [===[