From a311ebb97ef3ce492a7d2db06f1c6e1dfedda29e Mon Sep 17 00:00:00 2001 From: Marius Gedminas Date: Mon, 23 Mar 2020 10:56:57 +0200 Subject: [PATCH] Fix doctype tests I don't think linkchecker actually cares about the document type, so I'm not sure why we're even testing this... --- linkcheck/HtmlParser/htmllib.py | 2 +- linkcheck/HtmlParser/htmlsax.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/linkcheck/HtmlParser/htmllib.py b/linkcheck/HtmlParser/htmllib.py index 6c6e9c29..0eb96073 100644 --- a/linkcheck/HtmlParser/htmllib.py +++ b/linkcheck/HtmlParser/htmllib.py @@ -151,7 +151,7 @@ class HtmlPrettyPrinter (object): @type data: string @return: None """ - self.fd.write("" % data) + self.fd.write("" % data) def pi (self, data): """ diff --git a/linkcheck/HtmlParser/htmlsax.py b/linkcheck/HtmlParser/htmlsax.py index e3ed6be3..047fb928 100644 --- a/linkcheck/HtmlParser/htmlsax.py +++ b/linkcheck/HtmlParser/htmlsax.py @@ -93,7 +93,7 @@ class Parser(object): self.handler.comment(comment) elif isinstance(content, Doctype): if hasattr(self.handler, 'doctype'): - self.handler.doctype(content[7:]) + self.handler.doctype(content) elif isinstance(content, Comment): if hasattr(self.handler, 'comment'): self.handler.comment(content.strip())