Remove and \n tags from the link preview description which were present only on certain homeservers, e.g. matrix.org

This commit is contained in:
James Graham
2022-11-12 11:30:45 +00:00
parent 6848cfa581
commit bb8db23057

View File

@@ -57,7 +57,7 @@ void LinkPreviewer::setUrl(QUrl url)
connect(job, &BaseJob::success, this, [this, job]() {
const auto json = job->jsonData();
m_title = json["og:title"].toString().trimmed();
m_description = json["og:description"].toString().trimmed();
m_description = json["og:description"].toString().trimmed().replace("\n", " ");
m_imageSource = json["og:image"].toString();
m_loaded = true;
Q_EMIT titleChanged();