Don't attempt to strip markup from a KNotification's title
The KNotification documentation mentions that the text
property can
contain markup, but makes no such claim for title
, implying that the
latter is plaintext.
This parallels the Desktop Notifications Specification, which states that "Body text may contain markup"¹ without a similar mention for the summary/title. Although not stated explicitly, this has been widely accepted as indicating that the summary is indeed plaintext (and Plasma handles it as such²³).
Consequently, we should not attempt to strip any markup from the title;
users can rightfully expect that a string like a<b&b>a
will not get
mangled in the process.
This commit removes all calls to stripRichText(title)
, namely in the
Popup, Android and Snore plugins.
As for the MacOS and Portal plugins, although the absence of any such call might lead one to assume that a string with markup was expected before (which would now require some characters to be escaped), their respective documentation⁴⁵ implies the opposite, so no action was taken.
- https://specifications.freedesktop.org/notification-spec/latest/ar01s04.html#markup
- https://github.com/KDE/plasma-workspace/blob/d3adf06c72301365b0c707f968974574e345adac/dataengines/notifications/notificationsengine.cpp#L86-L87
- https://github.com/KDE/plasma-workspace/blob/a5c7df39460eff7454f992a2307753bfb1eb095f/libnotificationmanager/notification.cpp#L510-L529
- https://developer.apple.com/documentation/foundation/nsusernotification/1415172-title
- https://flatpak.github.io/xdg-desktop-portal/portal-docs.html#gdbus-method-org-freedesktop-portal-Notification.AddNotification