projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5b718fe
)
* luci/libs: use pcdata() in striptags()
author
Jo-Philipp Wich
<jow@openwrt.org>
Wed, 20 Aug 2008 16:55:10 +0000
(16:55 +0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Wed, 20 Aug 2008 16:55:10 +0000
(16:55 +0000)
libs/core/luasrc/util.lua
patch
|
blob
|
history
diff --git
a/libs/core/luasrc/util.lua
b/libs/core/luasrc/util.lua
index 66e368299f5b28f5e66f84e1b5a7857bca3de483..d8fc666233da71e8056bf55a8f4483dbf993e6bb 100644
(file)
--- 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