summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/luasrc/dispatcher.lua
diff options
context:
space:
mode:
Diffstat (limited to 'modules/luci-base/luasrc/dispatcher.lua')
-rw-r--r--modules/luci-base/luasrc/dispatcher.lua9
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/luci-base/luasrc/dispatcher.lua b/modules/luci-base/luasrc/dispatcher.lua
index 6e62e25308..44c17c85f8 100644
--- a/modules/luci-base/luasrc/dispatcher.lua
+++ b/modules/luci-base/luasrc/dispatcher.lua
@@ -5,6 +5,7 @@
local fs = require "nixio.fs"
local sys = require "luci.sys"
local util = require "luci.util"
+local xml = require "luci.xml"
local http = require "luci.http"
local nixio = require "nixio", require "nixio.util"
@@ -276,7 +277,7 @@ local function tree_to_json(node, json)
if type(node.nodes) == "table" then
for subname, subnode in pairs(node.nodes) do
local spec = {
- title = util.striptags(subnode.title),
+ title = xml.striptags(subnode.title),
order = subnode.order
}
@@ -741,7 +742,7 @@ local function init_template_engine(ctx)
(scope and type(scope[key]) ~= "function" and scope[key]) or "")
if noescape ~= true then
- val = util.pcdata(val)
+ val = xml.pcdata(val)
end
return string.format(' %s="%s"', tostring(key), val)
@@ -756,8 +757,8 @@ local function init_template_engine(ctx)
translate = i18n.translate;
translatef = i18n.translatef;
export = function(k, v) if tpl.context.viewns[k] == nil then tpl.context.viewns[k] = v end end;
- striptags = util.striptags;
- pcdata = util.pcdata;
+ striptags = xml.striptags;
+ pcdata = xml.pcdata;
media = media;
theme = fs.basename(media);
resource = luci.config.main.resourcebase;