mirror of
https://github.com/TangentFoxy/lovebird.git
synced 2025-07-28 02:52:19 +00:00
Fixed lovebird.htmlescape() to escape &
, "
and '
This commit is contained in:
@@ -497,8 +497,15 @@ function lovebird.parseurl(url)
|
||||
end
|
||||
|
||||
|
||||
local htmlescapemap = {
|
||||
["<"] = "<",
|
||||
["&"] = "&",
|
||||
['"'] = """,
|
||||
["'"] = "'",
|
||||
}
|
||||
|
||||
function lovebird.htmlescape(str)
|
||||
return ( str:gsub("<", "<") )
|
||||
return ( str:gsub("[<&\"']", htmlescapemap) )
|
||||
end
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user