From 97340bed13c9be1cd054b7572beb7eb7d19d4b3b Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Fri, 22 Jan 2021 17:03:03 +0100 Subject: [PATCH] Fix font tags showing up in playable media messages --- resources/qml/delegates/PlayableMediaMessage.qml | 1 - src/timeline/TimelineModel.cpp | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/qml/delegates/PlayableMediaMessage.qml b/resources/qml/delegates/PlayableMediaMessage.qml index be22687f..1534da2e 100644 --- a/resources/qml/delegates/PlayableMediaMessage.qml +++ b/resources/qml/delegates/PlayableMediaMessage.qml @@ -194,7 +194,6 @@ Rectangle { Text { Layout.fillWidth: true text: model.data.body - textFormat: Text.PlainText elide: Text.ElideRight color: colors.text } diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp index 5db6f0c2..80ccabea 100644 --- a/src/timeline/TimelineModel.cpp +++ b/src/timeline/TimelineModel.cpp @@ -353,7 +353,8 @@ TimelineModel::data(const mtx::events::collections::TimelineEvents &event, int r return QVariant(emojiCount); } case Body: - return QVariant(utils::replaceEmoji(QString::fromStdString(body(event)))); + return QVariant( + utils::replaceEmoji(QString::fromStdString(body(event)).toHtmlEscaped())); case FormattedBody: { const static QRegularExpression replyFallback( ".*", QRegularExpression::DotMatchesEverythingOption);