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
1 changed files with 1 additions and 0 deletions

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());