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:
parent
1c90b03476
commit
60fb83d770
@ -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());
|
||||
|
Loading…
x
Reference in New Issue
Block a user