except (ValueError, IndexError):
charset = None
self.log(" no charset in Content-Type header")
- if content_type == "text/html":
+ if content_type in ("text/html", "application/xhtml+xml"):
parser = parse_html(fname, charset, self.log)
bookmark.real_title = parser.title
if parser.refresh: