We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
2 parents3b7e017 +9ba3b28 commitb5b91ccCopy full SHA for b5b91cc
html5lib/inputstream.py
@@ -421,7 +421,7 @@ def __init__(self, source, encoding=None, parseMeta=True, chardet=True):
421
# Encoding Information
422
# Number of bytes to use when looking for a meta element with
423
# encoding information
424
-self.numBytesMeta=512
+self.numBytesMeta=1024
425
# Number of bytes to use when using detecting encoding using chardet
426
self.numBytesChardet=100
427
# Encoding to use if no other information can be found
@@ -430,6 +430,7 @@ def __init__(self, source, encoding=None, parseMeta=True, chardet=True):
430
# Detect encoding iff no explicit "transport level" encoding is supplied
431
if (self.charEncoding[0]isNone):
432
self.charEncoding=self.detectEncoding(parseMeta,chardet)
433
+assertself.charEncoding[0]isnotNone
434
435
# Call superclass
436
self.reset()