summary refs log tree commit diff
path: root/src/timeline/TimelineModel.cpp
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2022-08-18 22:05:47 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2022-08-18 22:05:47 +0200
commitff87bef0300c5bf7488ca6f9a1303a340cfece49 (patch)
treef4cde18408e28e5e343f47acb6e92af4b51f5faa /src/timeline/TimelineModel.cpp
parentBreak http images and implement barebones spoiler support when not in mobile ... (diff)
downloadnheko-ff87bef0300c5bf7488ca6f9a1303a340cfece49.tar.xz
Fix inline image escape order
Diffstat (limited to '')
-rw-r--r--src/timeline/TimelineModel.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp
index b2798e26..4820513f 100644
--- a/src/timeline/TimelineModel.cpp
+++ b/src/timeline/TimelineModel.cpp
@@ -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)));