On Friday 21 February 2014 02:28:20 Gioacchino Mazzurco wrote:
> /usr/bin/lua: /usr/lib/lua/luci/util.lua:31: module 'luci.template.parser'
> not found:
I have took a look at the code, this dependency inside the core doesn't make
much sense, because we are depending from the web module inside the core and
moreover just for this two functions wrapper
local tparser = require "luci.template.parser"
...
--- Create valid XML PCDATA from given string.
-- @param value String value containing the data to escape
-- @return String value containing the escaped data
function pcdata(value)
return value and tparser.pcdata(tostring(value))
end
--- Strip HTML tags from given string.
-- @param value String containing the HTML text
-- @return String with HTML tags stripped of
function striptags(value)
return value and tparser.striptags(tostring(value))
end
That only wrap the functions from web module...
I think that who need the web module should require it and not force everyone,
also who just need the just core, to install the luci-lib-web, because of two
wrapper functions, that she can access simply by requiring the right module...
I believe the require and those two function should be removed from util, and
who need them should include the right module.
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel