This commit is contained in:
Kovid Goyal 2014-04-26 15:09:41 +05:30
parent 3f0582ec3f
commit fee9953405

View File

@ -248,6 +248,7 @@ def parse_html(data, log=None, decoder=None, preprocessor=None,
# Remove DOCTYPE declaration as it messes up parsing # Remove DOCTYPE declaration as it messes up parsing
# In particular, it causes tostring to insert xmlns # In particular, it causes tostring to insert xmlns
# declarations, which messes up the coercing logic # declarations, which messes up the coercing logic
pre = ''
idx = data.find('<html') idx = data.find('<html')
if idx == -1: if idx == -1:
idx = data.find('<HTML') idx = data.find('<HTML')