mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-30 08:14:36 +01:00
Fix HTML 5 parser choking on comments
This commit is contained in:
parent
1a361f694f
commit
d6b82e3648
1 changed files with 1 additions and 1 deletions
|
|
@ -103,7 +103,7 @@ def html5_parse(data, max_nesting_depth=100):
|
|||
xmlns_declaration = '{%s}'%XMLNS_NS
|
||||
non_html5_namespaces = {}
|
||||
seen_namespaces = set()
|
||||
for elem in tuple(data.iter()):
|
||||
for elem in tuple(data.iter(tag=etree.Element)):
|
||||
elem.attrib.pop('xmlns', None)
|
||||
namespaces = {}
|
||||
for x in tuple(elem.attrib):
|
||||
|
|
|
|||
Loading…
Reference in a new issue