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)
|
lyrics.append(content.mid(start_lyrics_idx, end_lyrics_idx - start_lyrics_idx)
|
||||||
.remove('\r')
|
.remove('\r')
|
||||||
.remove('\n')
|
.remove('\n')
|
||||||
|
.remove(QRegularExpression("<script>.*</script>"))
|
||||||
.replace(QRegularExpression("<br[^>]*>"), "\n")
|
.replace(QRegularExpression("<br[^>]*>"), "\n")
|
||||||
.remove(QRegularExpression("<[^>]*>"))
|
.remove(QRegularExpression("<[^>]*>"))
|
||||||
.trimmed());
|
.trimmed());
|
||||||
|
|
Loading…
Reference in New Issue