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:
@@ -57,7 +57,7 @@ void LinkPreviewer::setUrl(QUrl url)
|
|||||||
connect(job, &BaseJob::success, this, [this, job]() {
|
connect(job, &BaseJob::success, this, [this, job]() {
|
||||||
const auto json = job->jsonData();
|
const auto json = job->jsonData();
|
||||||
m_title = json["og:title"].toString().trimmed();
|
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_imageSource = json["og:image"].toString();
|
||||||
m_loaded = true;
|
m_loaded = true;
|
||||||
Q_EMIT titleChanged();
|
Q_EMIT titleChanged();
|
||||||
|
|||||||
Reference in New Issue
Block a user