After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 500285 - Notifications fail to show correct text if artist/title/album contains &
Notifications fail to show correct text if artist/title/album contains &
Status: RESOLVED DUPLICATE of bug 445659
Product: rhythmbox
Classification: Other
Component: general
HEAD
Other Linux
: Normal normal
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-11-28 19:59 UTC by Alexander “weej” Jones
Modified: 2007-11-28 22:33 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Alexander “weej” Jones 2007-11-28 19:59:44 UTC
From notification-daemon output:

(notification-daemon:9680): Gtk-WARNING **: Failed to set text from markup due to error parsing markup: Error on line 1: Character ' ' is not valid at the start of an entity name; the & character begins an entity; if this ampersand isn't supposed to be an entity, escape it as &

It seems that the text isn't being escaped properly. I tracked down:

	char *primary_markup = g_markup_escape_text (primary, -1);
	char *secondary_markup = g_markup_escape_text (secondary, -1);

	rb_shell_hidden_notify_markup (shell, timeout, primary_markup, 
				       icon, secondary_markup, requested);

So it looks like it should be escaped but isn't.
Comment 1 Jonathan Matthew 2007-11-28 22:01:15 UTC
Are you sure this happens for the artist and album as well as the title?
The standard theme in current notification-daemon releases doesn't follow its own spec, and expects the notification title (which in our case contains the just song title) to be escaped when it shouldn't.  The notification body (the "by <artist> from <album>" bit) supports markup, so we do escape that.
Comment 2 Alexander “weej” Jones 2007-11-28 22:31:19 UTC
My mistake, it's actually just the title (primary markup) that is the problem.

(But the RB code is already escaping both primary and secondary markup, unless I've copied the wrong bit out.)

FWIW, this fails with the default standard as well as the Ubuntu theme.

Are you sure the spec says that the primary text isn't Pango markup?
Comment 3 Bastien Nocera 2007-11-28 22:33:15 UTC
Primary shouldn't be escaped, but the secondary should. It's fixed in trunk already for rhythmbox. Make sure you have a fixed notification-daemon, see the details in the other bug.

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