From 06a8ef6ebed5962117121486059ba46dc7f6d4f9 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Mon, 30 Aug 2021 12:35:27 +0200 Subject: Room: displayNameForHtml This is useful for cases when the room display name is returned to QML that doesn't have an equivalent of QString::toHtmlEscaped(). --- lib/room.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/room.cpp') diff --git a/lib/room.cpp b/lib/room.cpp index 45f1af53..890da13d 100644 --- a/lib/room.cpp +++ b/lib/room.cpp @@ -549,6 +549,11 @@ QString Room::canonicalAlias() const QString Room::displayName() const { return d->displayname; } +QString Room::displayNameForHtml() const +{ + return displayName().toHtmlEscaped(); +} + void Room::refreshDisplayName() { d->updateDisplayname(); } QString Room::topic() const -- cgit v1.2.3