mirror of
https://github.com/openwrt/luci.git
synced 2025-01-31 07:11:59 +00:00
673f38246a
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>
27 lines
582 B
Lua
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
|