mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-26 04:58:49 +03:00
Fix inline image escape order
This commit is contained in:
parent
08b304eccf
commit
ff87bef030
1 changed files with 2 additions and 2 deletions
|
@ -600,6 +600,7 @@ TimelineModel::data(const mtx::events::collections::TimelineEvents &event, int r
|
||||||
if (isReply)
|
if (isReply)
|
||||||
formattedBody_ = formattedBody_.remove(replyFallback);
|
formattedBody_ = formattedBody_.remove(replyFallback);
|
||||||
}
|
}
|
||||||
|
formattedBody_ = utils::escapeBlacklistedHtml(formattedBody_);
|
||||||
|
|
||||||
// TODO(Nico): Don't parse html with a regex
|
// TODO(Nico): Don't parse html with a regex
|
||||||
const static QRegularExpression matchIsImg(QStringLiteral("<img [^>]+>"));
|
const static QRegularExpression matchIsImg(QStringLiteral("<img [^>]+>"));
|
||||||
|
@ -637,8 +638,7 @@ TimelineModel::data(const mtx::events::collections::TimelineEvents &event, int r
|
||||||
formattedBody_.replace(curImg, imgReplacement);
|
formattedBody_.replace(curImg, imgReplacement);
|
||||||
}
|
}
|
||||||
|
|
||||||
return QVariant(
|
return QVariant(utils::replaceEmoji(utils::linkifyMessage(formattedBody_)));
|
||||||
utils::replaceEmoji(utils::linkifyMessage(utils::escapeBlacklistedHtml(formattedBody_))));
|
|
||||||
}
|
}
|
||||||
case Url:
|
case Url:
|
||||||
return QVariant(QString::fromStdString(url(event)));
|
return QVariant(QString::fromStdString(url(event)));
|
||||||
|
|
Loading…
Reference in a new issue