! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Desktop notifications break if they contain <br>
Status:
RESOLVED: DUPLICATE
Product:
Xfce4-notifyd
Component:
general

Comments

Description Jan 2015-03-16 00:06:55 CET
Hi!

I developed a program that shows system notifications using the freedesktop.org Notify call as described in https://developer.gnome.org/notification-spec/ and http://www.galago-project.org/specs/notification/0.9/x408.html.

IIUC, xfce4-notifyd uses this same spec, as seen for instance in http://goodies.xfce.org/projects/applications/notification-daemon-xfce.

I send a DBus call directly, I'm not using libnotify or any specific library.


My issue is that when the notification has a (plain text) title and a HTML-based body, the body itself disappears completely if the tag <br> or <br /> is present.

I've found this issue https://bugzilla.xfce.org/show_bug.cgi?id=10027 where it's explained that other than a few whitelisted tags, all other tags are removed. But what's happening is not that the tag itself is removed, it's the whole message.

This is easy to reproduce with notify-send like so:
$ notify-send "Some Title" "hello <br> this will not be shown"


Having the <br> tag allowed would be nice, btw. I've confirmed that using \n works, but then that is ignored in other environments, and since the notification is actually using HTML in general, HTML line breaks would make sense.

I've tested this on Xfce 4.10, but I've been told that the issue is there on 4.12 too =)


I'll be happy to further clarify anything that's not clear enough ;)

Thank you for your time, and for all your work on this great environment!
Comment 1 Simon Steinbeiss editbugs 2016-07-08 22:37:44 CEST
Hi! I quickly looked through the sourcecode and xfce4-notifyd does nothing special about HTML entities or tags, it basically only supports Pango markup (which is what Gtk itself comes with: https://developer.gnome.org/pango/stable/PangoMarkupFormat.html)
So you can use those tags there and in addition some stuff like \n to produce newlines.

This report is a duplicate of the older https://bugzilla.xfce.org/show_bug.cgi?id=10027

*** This bug has been marked as a duplicate of bug 10027 ***

Bug #11706

Reported by:
Jan
Reported on: 2015-03-16
Last modified on: 2016-07-08

People

Assignee:
Jérôme Guelfucci
CC List:
1 user

Version

Version:
unspecified

Attachments

Additional information