Do not skip whitelisting when converting 'div' elements to 'p'

pull/1222/head
Matt Westcott 2015-04-21 16:27:42 +01:00
rodzic 27c98d6ab3
commit fe4741e4e3
1 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -127,9 +127,10 @@ class DbWhitelister(Whitelister):
link_attrs['linktype'] = link_type link_attrs['linktype'] = link_type
tag.attrs.clear() tag.attrs.clear()
tag.attrs.update(**link_attrs) tag.attrs.update(**link_attrs)
elif tag.name == 'div':
tag.name = 'p'
else: else:
if tag.name == 'div':
tag.name = 'p'
super(DbWhitelister, cls).clean_tag_node(doc, tag) super(DbWhitelister, cls).clean_tag_node(doc, tag)