Replace HTML Characters with Unicode in Entry Title

This commit is contained in:
Tobias Fella 2020-05-01 14:56:29 +02:00
parent bb49d372a8
commit cd2cd738e3
1 changed files with 5 additions and 1 deletions

View File

@ -23,6 +23,7 @@
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QStandardPaths>
#include <QTextDocument>
#include <Syndication/Syndication>
@ -75,7 +76,10 @@ void Fetcher::fetch(QUrl url)
query.prepare(QStringLiteral("INSERT INTO Entries VALUES (:feed, :id, :title, :content, :created, :updated, :link);"));
query.bindValue(QStringLiteral(":feed"), url.toString());
query.bindValue(QStringLiteral(":id"), entry->id());
query.bindValue(QStringLiteral(":title"), entry->title());
QTextDocument title;
title.setHtml(entry->title());
query.bindValue(QStringLiteral(":title"), title.toPlainText());
query.bindValue(QStringLiteral(":created"), static_cast<int>(entry->datePublished()));
query.bindValue(QStringLiteral(":updated"), static_cast<int>(entry->dateUpdated()));
query.bindValue(QStringLiteral(":link"), entry->link());