[fix] IFrame included in html sanitizer svg elements

This commit is contained in:
Nabin Hait 2016-02-24 17:41:59 +05:30
parent 5649950dd2
commit a84dfdb29c

View file

@ -412,7 +412,7 @@ def sanitize_html(html):
# retuns html with escaped tags, escaped orphan >, <, etc.
escaped_html = bleach.clean(html,
tags=HTMLSanitizer.acceptable_elements + HTMLSanitizer.svg_elements,
tags=HTMLSanitizer.acceptable_elements + HTMLSanitizer.svg_elements + ["iframe"],
attributes={"*": HTMLSanitizer.acceptable_attributes, "svg": HTMLSanitizer.svg_attributes},
styles=bleach_whitelist.all_styles,
strip_comments=False)