* luci/libs/core: use numeric entities in pcdata()

This commit is contained in:
Jo-Philipp Wich 2008-10-24 19:15:09 +00:00
parent bf21777126
commit 9451a49408

View file

@ -195,11 +195,11 @@ end
-- @return String value containing the escaped data
function pcdata(value)
return value and tostring(value):gsub("[&\"'<>]", {
["&"] = "&amp;",
['"'] = "&quot;",
["'"] = "&apos;",
["<"] = "&lt;",
[">"] = "&gt;"
["&"] = "&#38;",
['"'] = "&#34;",
["'"] = "&#39;",
["<"] = "&#60;",
[">"] = "&#62;"
})
end