lyrics: Strip \u2005 (four-per-em space) in lyrics (Issue 3789)

https://github.com/beetbox/beets/issues/3789
This commit is contained in:
AnonTester 2020-11-07 21:41:16 +00:00
parent b63b66a391
commit 176fa55bf6

View file

@ -424,6 +424,7 @@ def _scrape_strip_cruft(html, plain_text_out=False):
html = re.sub(r' +', ' ', html) # Whitespaces collapse.
html = BREAK_RE.sub('\n', html) # <br> eats up surrounding '\n'.
html = re.sub(r'(?s)<(script).*?</\1>', '', html) # Strip script tags.
html = re.sub(u'\u2005', " ", html) # replace Unicode Four-per-em space with regular space
if plain_text_out: # Strip remaining HTML tags
html = COMMENT_RE.sub('', html)