From dc633e9c2f1c679acda0ded77134a75df8363045 Mon Sep 17 00:00:00 2001 From: Joseph Donofry <joedonofry@gmail.com> Date: Mon, 22 Nov 2021 19:23:36 -0500 Subject: [PATCH] Remove extra icon, fix html escaping --- resources/icons/ui/trash.svg | 1 - resources/qml/delegates/MessageDelegate.qml | 2 +- src/timeline/TimelineModel.cpp | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) delete mode 100644 resources/icons/ui/trash.svg diff --git a/resources/icons/ui/trash.svg b/resources/icons/ui/trash.svg deleted file mode 100644 index 18f52c5f0..000000000 --- a/resources/icons/ui/trash.svg +++ /dev/null @@ -1 +0,0 @@ -<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"/></svg> \ No newline at end of file diff --git a/resources/qml/delegates/MessageDelegate.qml b/resources/qml/delegates/MessageDelegate.qml index f0a1d9578..dea559380 100644 --- a/resources/qml/delegates/MessageDelegate.qml +++ b/resources/qml/delegates/MessageDelegate.qml @@ -189,7 +189,7 @@ Item { Label { id: redactedLabel Layout.alignment: Qt.AlignVCenter | Qt.AlignRight - text: qsTr("removed") + text: qsTr("Removed") ToolTip.text: room.formatRedactedEvent(eventId) ToolTip.visible: ma.containsMouse diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp index ab461c082..6f7646c7b 100644 --- a/src/timeline/TimelineModel.cpp +++ b/src/timeline/TimelineModel.cpp @@ -1808,14 +1808,14 @@ TimelineModel::formatRedactedEvent(QString id) if (!event) return ""; - QString user = QString::fromStdString(event->sender); + QString user = QString::fromStdString(event->sender).toHtmlEscaped(); QString name = utils::replaceEmoji(displayName(user)); QString dateTime = QDateTime::fromMSecsSinceEpoch(event->origin_server_ts).toString(); QString reason = ""; auto because = event->unsigned_data.redacted_because; if (because.has_value()) { - reason = QString::fromStdString(because->content.reason); + reason = QString::fromStdString(because->content.reason).toHtmlEscaped(); } if (reason.isEmpty()) { -- GitLab