Fix HTML escaping for custom OSD notifications

Fixes #618
This commit is contained in:
Jonas Kvinge
2020-12-11 23:59:38 +01:00
parent 9149d1baa3
commit 497952611d
15 changed files with 219 additions and 112 deletions

View File

@@ -144,7 +144,6 @@ void OSDDBus::ShowMessageNative(const QString &summary, const QString &message,
QVariantMap hints;
QString summary_stripped = summary;
summary_stripped = summary_stripped.remove(QRegularExpression("[&\"<>]")).simplified();
QString message_stripped = message.toHtmlEscaped();
if (!image.isNull()) {
if (version_ >= QVersionNumber(1, 2)) {
@@ -167,7 +166,7 @@ void OSDDBus::ShowMessageNative(const QString &summary, const QString &message,
id = notification_id_;
}
QDBusPendingReply<uint> reply = interface_->Notify(app_name(), id, icon, summary_stripped, message_stripped, QStringList(), hints, timeout_msec());
QDBusPendingReply<uint> reply = interface_->Notify(app_name(), id, icon, summary_stripped, message, QStringList(), hints, timeout_msec());
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(reply, this);
connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)), SLOT(CallFinished(QDBusPendingCallWatcher*)));