diff --git a/src/notifier.vala b/src/notifier.vala index f98bac8..358cf4d 100644 --- a/src/notifier.vala +++ b/src/notifier.vala @@ -73,18 +73,22 @@ namespace MpdNotify { private void send_notification(string summary, string? body = null, string? icon = null, int timeout = 2000) { + string thebody = null; + if (body != null) { + thebody = body.replace("&", "&"); + } if (notif == null) { if (Notify.is_initted()) { Notify.uninit(); } Notify.init("mpdnotify"); - notif = new Notify.Notification(summary, body, icon); + notif = new Notify.Notification(summary, thebody, icon); notif.set_timeout(timeout); notif.closed.connect(() => { notif = null; }); } else { - notif.update(summary, body, icon); + notif.update(summary, thebody, icon); } try { notif.show();