equal
deleted
inserted
replaced
213 from lxml import etree, html |
213 from lxml import etree, html |
214 from lxml.html import clean, defs |
214 from lxml.html import clean, defs |
215 |
215 |
216 ALLOWED_TAGS = (defs.general_block_tags | defs.list_tags | defs.table_tags | |
216 ALLOWED_TAGS = (defs.general_block_tags | defs.list_tags | defs.table_tags | |
217 defs.phrase_tags | defs.font_style_tags | |
217 defs.phrase_tags | defs.font_style_tags | |
218 set(('span', 'a', 'br', 'img', 'map', 'area', 'sub', 'sup')) |
218 set(('span', 'a', 'br', 'img', 'map', 'area', 'sub', 'sup', 'canvas')) |
219 ) |
219 ) |
220 |
220 |
221 CLEANER = clean.Cleaner(allow_tags=ALLOWED_TAGS, remove_unknown_tags=False, |
221 CLEANER = clean.Cleaner(allow_tags=ALLOWED_TAGS, remove_unknown_tags=False, |
222 style=True, safe_attrs_only=True, |
222 style=True, safe_attrs_only=True, |
223 add_nofollow=False, |
223 add_nofollow=False, |