Accept lowercase doctype declarations

上级 6cc96c28
......@@ -401,7 +401,7 @@ class HTMLLinkParser(HTMLParser):
self.anchors: List[Dict[str, Optional[str]]] = []
def handle_decl(self, decl: str) -> None:
if decl != "DOCTYPE html":
if decl.lower() != "doctype html":
self._raise_error()
self._seen_decl = True
......
<!DOCTYPE html>
<!doctype html>
<html>
<body>
<a href="../../../packages/simple-1.0.tar.gz">simple-1.0.tar.gz</a>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册