Skip to content

Commit 9d1a0fd

Browse files
committed
Shortcut the entire meta encoding pre-parse when possible
1 parent f1b28b0 commit 9d1a0fd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

html5lib/_inputstream.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -682,6 +682,9 @@ def __init__(self, data):
682682
self.encoding = None
683683

684684
def getEncoding(self):
685+
if b"<meta" not in self.data:
686+
return None
687+
685688
methodDispatch = (
686689
(b"<!--", self.handleComment),
687690
(b"<meta", self.handleMeta),

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy