summaryrefslogtreecommitdiffhomepage
path: root/libs/core
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2008-08-20 16:55:10 +0000
committerJo-Philipp Wich <jow@openwrt.org>2008-08-20 16:55:10 +0000
commitab71972c7e418be3a2a4d523c2f4ae5e9c5bfdd4 (patch)
treeadb975509225fd04354bdf00cfa3be9ee41e91fb /libs/core
parent5b718fe88d64c8b33ab0ef2c3d5d2ac26d8c154d (diff)
* luci/libs: use pcdata() in striptags()
Diffstat (limited to 'libs/core')
-rw-r--r--libs/core/luasrc/util.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/core/luasrc/util.lua b/libs/core/luasrc/util.lua
index 66e368299f..d8fc666233 100644
--- a/libs/core/luasrc/util.lua
+++ b/libs/core/luasrc/util.lua
@@ -212,7 +212,7 @@ end
-- @param value String containing the HTML text
-- @return String with HTML tags stripped of
function striptags(s)
- return (s:gsub("</?[A-Za-z][A-Za-z0-9:_%-]*[^>]*>", " "):gsub("%s+", " "))
+ return pcdata(s:gsub("</?[A-Za-z][A-Za-z0-9:_%-]*[^>]*>", " "):gsub("%s+", " "))
end
--- Splits given string on a defined separator sequence and return a table