Decode HTML entities in lyrics

This commit is contained in:
Jonas Kvinge
2021-01-11 16:05:39 +01:00
parent c5cd648b5d
commit b85819ed9d
7 changed files with 21 additions and 6 deletions

View File

@@ -650,11 +650,17 @@ QStringList Updateify(const QStringList &list) {
QString DecodeHtmlEntities(const QString &text) {
QString copy(text);
copy.replace("&", "&");
copy.replace(""", "\"");
copy.replace("'", "'");
copy.replace("&lt;", "<");
copy.replace("&gt;", ">");
copy.replace("&amp;", "&")
.replace("&#38;", "&")
.replace("&quot;", "\"")
.replace("&#34;", "\"")
.replace("&apos;", "'")
.replace("&#39;", "'")
.replace("&lt;", "<")
.replace("&#60;", "<")
.replace("&gt;", ">")
.replace("&#62;", ">");
return copy;
}