mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Conversion pipeline: Fix regression in 0.8.31 that broke parsing of documents containing a self closing <title/> tag. Fixes #910325 (Mobi conversion not working on kindle iphone app)
This commit is contained in:
parent
d2c188cbaa
commit
b005840838
@ -80,6 +80,7 @@ def node_depth(node):
|
||||
|
||||
def html5_parse(data, max_nesting_depth=100):
|
||||
import html5lib
|
||||
data = re.sub(r'<\s*title\s*/\s*>', '<title></title>', data)
|
||||
data = html5lib.parse(data, treebuilder='lxml').getroot()
|
||||
|
||||
# Check that the asinine HTML 5 algorithm did not result in a tree with
|
||||
|
Loading…
x
Reference in New Issue
Block a user