diff options
author | NiLSPACE <niels.breuker@hotmail.nl> | 2020-10-17 14:10:48 +0200 |
---|---|---|
committer | NiLSPACE <niels.breuker@hotmail.nl> | 2020-10-17 14:10:48 +0200 |
commit | b7c3ad80966d3532468c40bd1d8355aa1841fae8 (patch) | |
tree | b975fb396b612fca836988aa88b8df0a2b777b96 | |
parent | Added ability to register webadmin pages through Info.lua (diff) | |
download | cuberite-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.lua | 6 |
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 )(), [===[ |