This commit is contained in:
Black Hat
2019-05-23 16:44:34 +08:00
parent 0f156ea98b
commit a76e63063d
3 changed files with 6 additions and 5 deletions

View File

@@ -267,7 +267,8 @@ QVariant MessageEventModel::data(const QModelIndex& idx, int role) const {
const auto& evt = isPending ? **pendingIt : **timelineIt;
if (role == Qt::DisplayRole) {
return utils::removeReply(m_currentRoom->eventToString(evt, Qt::RichText));
return utils::cleanHTML(
utils::removeReply(m_currentRoom->eventToString(evt, Qt::RichText)));
}
if (role == MessageRole) {
@@ -410,8 +411,8 @@ QVariant MessageEventModel::data(const QModelIndex& idx, int role) const {
case ReplyEventIdRole:
return replyEventId;
case ReplyDisplayRole:
return utils::removeReply(
m_currentRoom->eventToString(replyEvt, Qt::RichText));
return utils::cleanHTML(utils::removeReply(
m_currentRoom->eventToString(replyEvt, Qt::RichText)));
case ReplyAuthorRole:
return QVariant::fromValue(m_currentRoom->user(replyEvt.senderId()));
}