Fix font tags showing up in playable media messages

This commit is contained in:
Nicolas Werner 2021-01-22 17:03:03 +01:00
parent 4f80fbea97
commit 97340bed13
2 changed files with 2 additions and 2 deletions

View file

@ -194,7 +194,6 @@ Rectangle {
Text { Text {
Layout.fillWidth: true Layout.fillWidth: true
text: model.data.body text: model.data.body
textFormat: Text.PlainText
elide: Text.ElideRight elide: Text.ElideRight
color: colors.text color: colors.text
} }

View file

@ -353,7 +353,8 @@ TimelineModel::data(const mtx::events::collections::TimelineEvents &event, int r
return QVariant(emojiCount); return QVariant(emojiCount);
} }
case Body: case Body:
return QVariant(utils::replaceEmoji(QString::fromStdString(body(event)))); return QVariant(
utils::replaceEmoji(QString::fromStdString(body(event)).toHtmlEscaped()));
case FormattedBody: { case FormattedBody: {
const static QRegularExpression replyFallback( const static QRegularExpression replyFallback(
"<mx-reply>.*</mx-reply>", QRegularExpression::DotMatchesEverythingOption); "<mx-reply>.*</mx-reply>", QRegularExpression::DotMatchesEverythingOption);