From: Oleg Broytman Date: Mon, 20 Nov 2023 01:12:54 +0000 (+0300) Subject: Fix(parse_html/bkmk_ph_beautifulsoup4): Fix title recombination X-Git-Tag: 5.0.0~10 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=ea440b7a93009308e8d87351725b600f1929b181;p=bookmarks_db.git Fix(parse_html/bkmk_ph_beautifulsoup4): Fix title recombination --- diff --git a/parse_html/bkmk_ph_beautifulsoup4.py b/parse_html/bkmk_ph_beautifulsoup4.py index d76c05a..7687c75 100644 --- a/parse_html/bkmk_ph_beautifulsoup4.py +++ b/parse_html/bkmk_ph_beautifulsoup4.py @@ -71,7 +71,10 @@ def parse_html(html_text, charset=None, log=None): for part in title: #if not isinstance(part, string_type): # part = part.decode() - parts.append(part.strip()) + if part.strip: + parts.append(part.strip()) + else: + parts.append(' ') # Skip tags, they're usually `
` title = ''.join(parts) meta = head.find(_find_contenttype, recursive=False)