]> git.phdru.name Git - bookmarks_db.git/blobdiff - parse_html/bkmk_ph_htmlparser.py
Fix(parse_html): Do not parse empty strings
[bookmarks_db.git] / parse_html / bkmk_ph_htmlparser.py
index fd7b687d102f131928f675e0132c9a55dd01ef49..c0f89b411d688bc99ecaab1a377c80abb36b6891 100644 (file)
@@ -89,6 +89,8 @@ class HTMLParser(_HTMLParser):
 
 
 def parse_html(html_text, charset=None, log=None):
+    if not html_text:
+        return None
     parser = HTMLParser(charset)
 
     try: