* luci/libs: use pcdata() in striptags()
This commit is contained in:
parent
5b718fe88d
commit
ab71972c7e
1 changed files with 1 additions and 1 deletions
|
@ -212,7 +212,7 @@ end
|
||||||
-- @param value String containing the HTML text
|
-- @param value String containing the HTML text
|
||||||
-- @return String with HTML tags stripped of
|
-- @return String with HTML tags stripped of
|
||||||
function striptags(s)
|
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
|
end
|
||||||
|
|
||||||
--- Splits given string on a defined separator sequence and return a table
|
--- Splits given string on a defined separator sequence and return a table
|
||||||
|
|
Loading…
Reference in a new issue