Bug 45399 - In notification-daemon, body not displayed if it contains "&"
Summary: In notification-daemon, body not displayed if it contains "&"
Alias: None
Product: dbus
Classification: Unclassified
Component: core (show other bugs)
Version: 1.4.x
Hardware: All Linux (All)
: medium major
Assignee: Havoc Pennington
QA Contact: John (J5) Palmieri
Depends on:
Reported: 2012-01-30 06:02 UTC by abhijeet.1989
Modified: 2012-01-30 16:31 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Description abhijeet.1989 2012-01-30 06:02:59 UTC
>>> import pynotify
>>> pynotify.init("Demo")
>>> alert = pynotify.Notification("Hi", "Bye & Pye")
>>> alert.show()

The corresponding notification: http://i.imgur.com/qzb8j.png

First, I thought that it's related to python module so I checked using the libnotify library in c instead. 

So, I executed this program. http://sprunge.us/NAgO
with command: ./a.out "Heading" "Body & notification"

Got the same result. No body if I have & in body.

notification-daemon 0.7.3
dbus-python 1.0.0

Please inform if you need something more.
Comment 1 Thiago Macieira 2012-01-30 07:36:56 UTC
Why do you think this is a D-Bus core issue?

Please try with another destination program that is not notification-daemon. Tell us if the & is received properly.
Comment 2 abhijeet.1989 2012-01-30 07:41:32 UTC
Frankly, I don't know much about whether it's a dbus core issue. Dbus was the only topic which was relevant to the bug, so I posted it here.
Comment 3 Thiago Macieira 2012-01-30 08:13:22 UTC
I believe this is from the notification-daemon. Please report it there.

Also note that it might be intentional. Check the manual for that program.
Comment 4 Simon McVittie 2012-01-30 16:18:44 UTC
I suspect the notification daemon might expect the string to be HTML (or XML), in which & is a special character. Try escaping it to &.

Regardless, that's not a bug in D-Bus or dbus-python.
Comment 5 abhijeet.1989 2012-01-30 16:31:17 UTC
Indeed, you are right.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.