Escape html in topics and show line breaks in the settings

This commit is contained in:
Nicolas Werner 2021-04-19 11:20:34 +02:00
parent a792ea1465
commit d6109b95fb
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
4 changed files with 17 additions and 9 deletions

View file

@ -62,10 +62,11 @@ RoomsModel::data(const QModelIndex &index, int role) const
case CompletionModel::SearchRole:
case Qt::DisplayRole:
case Roles::RoomAlias:
return roomAliases[index.row()];
return roomAliases[index.row()].toHtmlEscaped();
case CompletionModel::SearchRole2:
case Roles::RoomName:
return QString::fromStdString(roomInfos.at(roomids[index.row()]).name);
return QString::fromStdString(roomInfos.at(roomids[index.row()]).name)
.toHtmlEscaped();
case Roles::AvatarUrl:
return QString::fromStdString(
roomInfos.at(roomids[index.row()]).avatar_url);