This commit is contained in:
Kovid Goyal 2020-04-29 08:36:47 +05:30
commit 92c412996f
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -115,7 +115,7 @@ class HTMLFile(object):
encoding = detect_xml_encoding(src)[1]
if encoding:
try:
header = header.decode(encoding)
header = header.decode(encoding, errors='ignore')
except ValueError:
pass
self.is_binary = level > 0 and not bool(self.HTML_PAT.search(header))