summaryrefslogtreecommitdiffhomepage
path: root/libs/core/luasrc
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-11-20 19:22:05 +0000
committerSteven Barth <steven@midlink.org>2008-11-20 19:22:05 +0000
commit9c260769a50956e9ece40a10e226da8e7191158c (patch)
tree4ea3d44e524dacadbd514a355ad3a6aebc7a054b /libs/core/luasrc
parent9a203c52dd9bcbdb11bc86b99ea61027eec7cc26 (diff)
More C-Functions (luci.cutil.instanceof, luci.cutil.pcdata)
Diffstat (limited to 'libs/core/luasrc')
-rw-r--r--libs/core/luasrc/util.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/core/luasrc/util.lua b/libs/core/luasrc/util.lua
index ffab60cb07..e493811256 100644
--- a/libs/core/luasrc/util.lua
+++ b/libs/core/luasrc/util.lua
@@ -105,6 +105,7 @@ class = cutil.class
-- @return Boolean indicating whether the object is an instance
-- @see class
-- @see clone
+--[[
function instanceof(object, class)
local meta = getmetatable(object)
while meta and meta.__index do
@@ -115,6 +116,8 @@ function instanceof(object, class)
end
return false
end
+]]--
+instanceof = cutil.instanceof
--
@@ -201,6 +204,7 @@ end
--- 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 tostring(value):gsub("[&\"'<>]", {
["&"] = "&#38;",
@@ -210,6 +214,8 @@ function pcdata(value)
[">"] = "&#62;"
})
end
+]]--
+pcdata = cutil.pcdata
--- Strip HTML tags from given string.
-- @param value String containing the HTML text