diff options
| author | Karol Kosek <krkk@krkk.ct8.pl> | 2020-12-27 11:57:55 +0100 |
|---|---|---|
| committer | Felix Queißner <felix@ib-queissner.de> | 2020-12-28 10:39:56 +0100 |
| commit | ad2f21a9fe2e6ec76df7e5ab70627687aac4342d (patch) | |
| tree | 1bd4d9495365ae2f4fbff830ab1b87594cf72ea5 /src/browsertab.cpp | |
| parent | 346618c52e9c9e6d6fe9e91f0ef1a84c05210dc8 (diff) | |
| download | kristall-ad2f21a9fe2e6ec76df7e5ab70627687aac4342d.tar.gz | |
BrowserTab: escape HTML sequences in title
Diffstat (limited to 'src/browsertab.cpp')
| -rw-r--r-- | src/browsertab.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
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("</title>", 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(); } } } |
