mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 20:48:52 +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)
|
||||
formattedBody_ = formattedBody_.remove(replyFallback);
|
||||
}
|
||||
formattedBody_ = utils::escapeBlacklistedHtml(formattedBody_);
|
||||
|
||||
// TODO(Nico): Don't parse html with a regex
|
||||
const static QRegularExpression matchIsImg(QStringLiteral("<img [^>]+>"));
|
||||
|
@ -637,8 +638,7 @@ TimelineModel::data(const mtx::events::collections::TimelineEvents &event, int r
|
|||
formattedBody_.replace(curImg, imgReplacement);
|
||||
}
|
||||
|
||||
return QVariant(
|
||||
utils::replaceEmoji(utils::linkifyMessage(utils::escapeBlacklistedHtml(formattedBody_))));
|
||||
return QVariant(utils::replaceEmoji(utils::linkifyMessage(formattedBody_)));
|
||||
}
|
||||
case Url:
|
||||
return QVariant(QString::fromStdString(url(event)));
|
||||
|
|
Loading…
Reference in a new issue