aboutsummaryrefslogtreecommitdiffstats
path: root/lualib/lua_util.lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2024-02-21 17:52:02 +0600
committerGitHub <noreply@github.com>2024-02-21 17:52:02 +0600
commita8c0e34fc81c407990d2179bad10abfd2b38c97f (patch)
tree3e0da4a8b91a2281c87b178adef97b1ef8a2f92d /lualib/lua_util.lua
parent8c8f53d783edb077d067a26c122fc5f42acbb954 (diff)
parent50e9652789628026d15e08c3e891e50364375fc6 (diff)
downloadrspamd-a8c0e34fc81c407990d2179bad10abfd2b38c97f.tar.gz
rspamd-a8c0e34fc81c407990d2179bad10abfd2b38c97f.zip
Merge pull request #4826 from rspamd/vstakhov-fix-history-key
[Fix] Fix history key, as we use `{=` and not `{{` in templates
Diffstat (limited to 'lualib/lua_util.lua')
-rw-r--r--lualib/lua_util.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/lualib/lua_util.lua b/lualib/lua_util.lua
index 6964b0f00..07ab13c9c 100644
--- a/lualib/lua_util.lua
+++ b/lualib/lua_util.lua
@@ -171,7 +171,7 @@ end
-- @param {boolean} skip_global_env don't export Rspamd superglobals
-- @return {string} string containing replaced values
-- @example
--- lua_util.jinja_template("HELLO {{FOO}} {{BAR}}!", {['FOO'] = 'LUA', ['BAR'] = 'WORLD'})
+-- lua_util.jinja_template("HELLO {=FOO=} {=BAR=}!", {['FOO'] = 'LUA', ['BAR'] = 'WORLD'})
-- "HELLO LUA WORLD!"
--]]
exports.jinja_template = function(text, env, skip_global_env)
@@ -190,7 +190,7 @@ end
-- @param {boolean} skip_global_env don't export Rspamd superglobals
-- @return {string} string containing replaced values
-- @example
--- lua_util.jinja_template("HELLO {{FOO}} {{BAR}}!", {['FOO'] = 'LUA', ['BAR'] = 'WORLD'})
+-- lua_util.jinja_template("HELLO {=FOO=} {=BAR=}!", {['FOO'] = 'LUA', ['BAR'] = 'WORLD'})
-- "HELLO LUA WORLD!"
--]]
exports.jinja_template_file = function(filename, env, skip_global_env)