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:
Kovid Goyal 2011-12-31 15:36:52 +05:30
parent d2c188cbaa
commit b005840838

View File

@ -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