0
0
mirror of https://github.com/openwrt/luci.git synced 2025-01-31 07:11:59 +00:00
Jo-Philipp Wich 673f38246a treewide: separate Lua runtime resources
Move classes required for Lua runtime support into a new `luci-lua-runtime`
package. Also replace the `luci.http` and `luci.util` classes in
`luci-lib-base` with stubbed versions interacting with the ucode based
runtime environment.

Finally merge `luci-base-ucode` into the remainders of `luci-base`.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-10-25 01:03:37 +02:00

27 lines
582 B
Lua

-- Copyright 2008 Steven Barth <steven@midlink.org>
-- Licensed to the public under the Apache License 2.0.
local tparser = require "luci.template.parser"
local string = require "string"
local tostring = tostring
module "luci.xml"
--
-- String and data manipulation routines
--
function pcdata(value)
return value and tparser.pcdata(tostring(value))
end
function striptags(value)
return value and tparser.striptags(tostring(value))
end
-- also register functions above in the central string class for convenience
string.pcdata = pcdata
string.striptags = striptags