diff --git a/src/osd/osdbase.cpp b/src/osd/osdbase.cpp index 0ac188acc..968f1cc58 100644 --- a/src/osd/osdbase.cpp +++ b/src/osd/osdbase.cpp @@ -146,8 +146,7 @@ void OSDBase::ShowPlaying(const Song &song, const QUrl &cover_url, const QImage message_parts << tr("track %1").arg(song.track()); } - summary = summary.remove('&').simplified(); - QString message = message_parts.join(", ").remove('&').simplified(); + QString message = message_parts.join(", "); if (show_art_) { ShowMessage(summary, message, "notification-audio-play", image); diff --git a/src/osd/osddbus.cpp b/src/osd/osddbus.cpp index 5b6fd8af4..d9f9baee3 100644 --- a/src/osd/osddbus.cpp +++ b/src/osd/osddbus.cpp @@ -141,6 +141,10 @@ void OSDDBus::ShowMessageNative(const QString &summary, const QString &message, if (!interface_) return; QVariantMap hints; + QString summary_stripped = summary; + QString message_stripped = message; + summary_stripped = summary_stripped.remove('&').simplified(); + message_stripped = message_stripped.remove('&').simplified(); if (!image.isNull()) { if (version_ >= QVersionNumber(1, 2)) { @@ -163,7 +167,7 @@ void OSDDBus::ShowMessageNative(const QString &summary, const QString &message, id = notification_id_; } - QDBusPendingReply reply = interface_->Notify(app_name(), id, icon, summary, message, QStringList(), hints, timeout_msec()); + QDBusPendingReply reply = interface_->Notify(app_name(), id, icon, summary_stripped, message_stripped, QStringList(), hints, timeout_msec()); QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(reply, this); connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)), SLOT(CallFinished(QDBusPendingCallWatcher*)));