From 176fa55bf6f88c9c45f9c45ce7e951a2c5444c37 Mon Sep 17 00:00:00 2001 From: AnonTester <40003252+AnonTester@users.noreply.github.com> Date: Sat, 7 Nov 2020 21:41:16 +0000 Subject: [PATCH] lyrics: Strip \u2005 (four-per-em space) in lyrics (Issue 3789) https://github.com/beetbox/beets/issues/3789 --- beetsplug/lyrics.py | 1 + 1 file changed, 1 insertion(+) diff --git a/beetsplug/lyrics.py b/beetsplug/lyrics.py index 5591598ae..58773ae2b 100644 --- a/beetsplug/lyrics.py +++ b/beetsplug/lyrics.py @@ -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) #
eats up surrounding '\n'. html = re.sub(r'(?s)<(script).*?', '', 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)