* luci/libs/core: use numeric entities in pcdata()
This commit is contained in:
parent
bf21777126
commit
9451a49408
1 changed files with 12 additions and 12 deletions
|
@ -195,11 +195,11 @@ end
|
|||
-- @return String value containing the escaped data
|
||||
function pcdata(value)
|
||||
return value and tostring(value):gsub("[&\"'<>]", {
|
||||
["&"] = "&",
|
||||
['"'] = """,
|
||||
["'"] = "'",
|
||||
["<"] = "<",
|
||||
[">"] = ">"
|
||||
["&"] = "&",
|
||||
['"'] = """,
|
||||
["'"] = "'",
|
||||
["<"] = "<",
|
||||
[">"] = ">"
|
||||
})
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue