]> git.phdru.name Git - bookmarks_db.git/blobdiff - parse_html/bkmk_parse_html.py
Fix(Py3): Fix HTML parsers
[bookmarks_db.git] / parse_html / bkmk_parse_html.py
index 85aeb88e4b63bef832f7f67871cb32e54e57a3de..be5daab26e85ec47620838f506b49085c392e78f 100644 (file)
@@ -168,7 +168,7 @@ def parse_html(html_text, charset=None, log=None):
     #            parser.charset = 'ascii'
 
     converted_title = title = parser.title
-    if title and (not parser.charset):
+    if title and isinstance(title, bytes) and (not parser.charset):
         try:
             title.decode("ascii")
         except UnicodeDecodeError: