HtmlLyricsProvider: Remove <script> tags and content between
This commit is contained in:
@@ -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());
|
||||||
|
|||||||
Reference in New Issue
Block a user