aboutsummaryrefslogtreecommitdiffstats
path: root/util/template.lua
diff options
context:
space:
mode:
Diffstat (limited to 'util/template.lua')
-rw-r--r--util/template.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/template.lua b/util/template.lua
index 04ebb93d..bc56020c 100644
--- a/util/template.lua
+++ b/util/template.lua
@@ -4,7 +4,7 @@ local setmetatable = setmetatable;
local pairs = pairs;
local ipairs = ipairs;
local error = error;
-local loadstring = loadstring;
+local envload = require "util.envload".envload;
local debug = debug;
local t_remove = table.remove;
local parse_xml = require "util.xml".parse;
@@ -72,7 +72,7 @@ local function create_cloner(stanza, chunkname)
src = src.."local _"..i.."="..lookup[i]..";";
end
src = src.."return "..name..";end";
- local f,err = loadstring(src, chunkname);
+ local f,err = envload(src, chunkname);
if not f then error(err); end
return f(setmetatable, stanza_mt);
end