From ad2f21a9fe2e6ec76df7e5ab70627687aac4342d Mon Sep 17 00:00:00 2001 From: Karol Kosek Date: Sun, 27 Dec 2020 11:57:55 +0100 Subject: BrowserTab: escape HTML sequences in title --- src/browsertab.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/browsertab.cpp') diff --git a/src/browsertab.cpp b/src/browsertab.cpp index aa082d4..fdc6fc3 100644 --- a/src/browsertab.cpp +++ b/src/browsertab.cpp @@ -530,10 +530,9 @@ void BrowserTab::renderPage(const QByteArray &data, const MimeType &mime) QStringList b = a[1].split("", Qt::KeepEmptyParts, Qt::CaseInsensitive); if (b[0] != a[1]) { - QString title = b[0]; - this->page_title = title; - - // TODO: Escape HTML sequences in title (such as —) + QTextDocument title; + title.setHtml(b[0]); + this->page_title = title.toPlainText(); } } } -- cgit v1.2.3