Whoops!
In some circumstances, the new Sanitizer was double-escaping text nodes. Fixed (with unit test).
This commit is contained in:
parent
45405fc97e
commit
f6508de6dd
4 changed files with 20 additions and 9 deletions
|
@ -149,7 +149,7 @@ module Sanitizer
|
|||
end
|
||||
node.attributes.each do |attr,val|
|
||||
if String === val
|
||||
node.attributes[attr] = CGI.escapeHTML(CGI.unescapeHTML(val))
|
||||
node.attributes[attr] = val.unescapeHTML.escapeHTML
|
||||
else
|
||||
node.attributes.delete attr
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue