diff --git a/linkcheck/checker/const.py b/linkcheck/checker/const.py index a46a030d..28019d93 100644 --- a/linkcheck/checker/const.py +++ b/linkcheck/checker/const.py @@ -139,6 +139,7 @@ PARSE_EXTENSIONS = { PARSE_MIMETYPES = ( "text/html", + "application/xhtml+xml", "text/css", "application/x-shockwave-flash", ) diff --git a/linkcheck/checker/httpurl.py b/linkcheck/checker/httpurl.py index 73d75e14..af2631f2 100644 --- a/linkcheck/checker/httpurl.py +++ b/linkcheck/checker/httpurl.py @@ -606,7 +606,7 @@ Use URL %(newurl)s instead for checking.""") % { """ if not (self.valid and self.headers): return False - if headers.get_content_type(self.headers) != "text/html": + if headers.get_content_type(self.headers) not in ("text/html", "application/xhtml+xml"): return False return self.encoding_supported()