Escape potential HTML in notifications

Originally done in https://gitlab.com/spectral-im/spectral/-/merge_requests/74
This commit is contained in:
Nicolas Fella
2020-11-25 00:49:19 +01:00
parent 5f932fb112
commit 619fc3907f

View File

@@ -35,7 +35,7 @@ void NotificationsManager::postNotification(const QString &roomid, const QString
img.convertFromImage(icon);
KNotification *notification = new KNotification("message");
notification->setTitle(i18n("%1 (%2)", sender, roomname));
notification->setText(text);
notification->setText(text.toHtmlEscaped());
notification->setPixmap(img);
notification->sendEvent();