From c65b237b9922b714a6ecc4c9489e3054c115da34 Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Sat, 10 Mar 2012 12:37:57 +0000 Subject: [PATCH] lyrics: resolve   entity --- beetsplug/lyrics.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/beetsplug/lyrics.py b/beetsplug/lyrics.py index 7be1ae659..2ea364649 100644 --- a/beetsplug/lyrics.py +++ b/beetsplug/lyrics.py @@ -31,11 +31,13 @@ TAG_RE = re.compile(r'<[^>]*>') BREAK_RE = re.compile(r'') def unescape(text): - """Resolves &#xxx; HTML entities.""" + """Resolves &#xxx; HTML entities (and some others).""" + out = text.replace(' ', ' ') def replchar(m): num = m.group(1) return unichr(int(num)) - return re.sub("&#(\d+);", replchar, text) + out = re.sub("&#(\d+);", replchar, out) + return out def extract_text(html, starttag): """Extract the text from a
tag in the HTML starting with