Bug 389323 - Notifications not displayed correctly when message contains <
Summary: Notifications not displayed correctly when message contains <
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Notifications (show other bugs)
Version: 5.10.5
Platform: Kubuntu Linux
: NOR normal
Target Milestone: 1.0
Assignee: Kai Uwe Broulik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-22 18:59 UTC by Lastique
Modified: 2018-01-23 10:21 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lastique 2018-01-22 18:59:38 UTC
Try executing the following command:

notify-send "abcd <z efgh"

The displayed notification will only include "abcd" part. It looks like the notification is interpreted somehow (possibly as HTML or XML) while it is expected to be plain text to be reproduced as is.

This affects applications such as Thunderbird, which may display new email notifications where the message contains email title, which can have special characters like "<".
Comment 1 Kai Uwe Broulik 2018-01-23 08:41:25 UTC
Notification server provides the "body-markup" capability which means notifications must be HTML-escaped.
Comment 2 Lastique 2018-01-23 09:50:09 UTC
Is this "body-markup" a KDE-specific feature (i.e. not mandated by the underlying protocol or specification)? If so, I think applications cannot be expected to perform escaping, certainly not non-KDE ones.
Comment 3 Kai Uwe Broulik 2018-01-23 10:15:30 UTC
No, it is part of the freedesktop notification specification also used by others, such as Gnome. A server has to query the capabilities of the server before using it, cf.:

qdbus org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.GetCapabilities

Google Chrome as a non-KDE application does, for instance, and will escape when "body-markup" is present, or send plain-text if not. Please file a bug report against the offending application.
Comment 4 Lastique 2018-01-23 10:21:16 UTC
I see. Thanks for the clarification.