Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb5b91cc

Browse files
committed
Merge pull request#238 from gsnedders/inputstream_update
Update prescan to scan 1024 bytes; r=nobody!
2 parents3b7e017 +9ba3b28 commitb5b91cc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎html5lib/inputstream.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ def __init__(self, source, encoding=None, parseMeta=True, chardet=True):
421421
# Encoding Information
422422
# Number of bytes to use when looking for a meta element with
423423
# encoding information
424-
self.numBytesMeta=512
424+
self.numBytesMeta=1024
425425
# Number of bytes to use when using detecting encoding using chardet
426426
self.numBytesChardet=100
427427
# Encoding to use if no other information can be found
@@ -430,6 +430,7 @@ def __init__(self, source, encoding=None, parseMeta=True, chardet=True):
430430
# Detect encoding iff no explicit "transport level" encoding is supplied
431431
if (self.charEncoding[0]isNone):
432432
self.charEncoding=self.detectEncoding(parseMeta,chardet)
433+
assertself.charEncoding[0]isnotNone
433434

434435
# Call superclass
435436
self.reset()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp