1
0
mirror of https://github.com/strawberrymusicplayer/strawberry synced 2025-01-30 00:55:33 +01:00

HtmlLyricsProvider: Remove <script> tags and content between

This commit is contained in:
Jonas Kvinge 2023-09-20 17:38:45 +02:00
parent 1c90b03476
commit 60fb83d770

View File

@ -156,6 +156,7 @@ QString HtmlLyricsProvider::ParseLyricsFromHTML(const QString &content, const QR
lyrics.append(content.mid(start_lyrics_idx, end_lyrics_idx - start_lyrics_idx)
.remove('\r')
.remove('\n')
.remove(QRegularExpression("<script>.*</script>"))
.replace(QRegularExpression("<br[^>]*>"), "\n")
.remove(QRegularExpression("<[^>]*>"))
.trimmed());