summaryrefslogtreecommitdiffstats
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
parentAdded ability to register webadmin pages through Info.lua (diff)
downloadcuberite-LuaWebControllers.tar
cuberite-LuaWebControllers.tar.gz
cuberite-LuaWebControllers.tar.bz2
cuberite-LuaWebControllers.tar.lz
cuberite-LuaWebControllers.tar.xz
cuberite-LuaWebControllers.tar.zst
cuberite-LuaWebControllers.zip
-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
)(), [===[