]> git.phdru.name Git - bookmarks_db.git/blobdiff - Robots/bkmk_rsimple.py
application/xhtml+xml is HTML, too.
[bookmarks_db.git] / Robots / bkmk_rsimple.py
index 32083ee95b254e264f367b5becb18a8f26d91d78..0dee51e8837ae3db9922704d78bd3e08b7325df7 100644 (file)
@@ -157,14 +157,14 @@ class robot_simple(Robot):
             try:
                content_type = headers["Content-Type"]
                try:
-                  content_type, charset = content_type.split(';')
+                  content_type, charset = content_type.split(';', 1)
                   content_type = content_type.strip()
                   charset = charset.split('=')[1].strip()
                   self.log("   HTTP charset   : %s" % charset)
                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: