GNOME Bugzilla – Bug 445659
Displays & as & in libnotify notification area song notifications
Last modified: 2008-09-02 13:12:20 UTC
Please describe the problem: Should display & cleanly Steps to reproduce: 1. Play a song with & in the title while rhythmbox is hidden in the notif. area Actual results: See Something & Something Expected results: Should see Something & Something Does this happen every time? Yes Other information: Shows fine elsewhere in the UI
What version of libnotify are you using? '&' and various other characters appear correctly for me with libnotify 0.4.x.
0.4.4-2 on Fedora 7 Running the command "notify-send "Test & test"" results in a notification being displayed with & correctly, so I doubt it's a libnotify issue. This does happen for multiple unique songs with titles having '&' in them.
Actually, I think this is a notification-daemon theme bug. The 'standard' theme passes the notification text unmodified to gtk_label_set_markup, but the 'bubble' theme runs it through g_markup_escape_text.
Ah, okay, I see that "Rewrite the Bubble theme" is a task on notification-daemon's trac http://trac.galago-project.org/ticket/52 , I'll make a note of this there, thanks
Actually, this is rhythmboxes fault. The notification spec explicitly supports markup in the body, but not in the summary.
Spec is at: http://www.galago-project.org/specs/notification/0.9/x161.html Not great, but I guess it explains what it does. So no markup, but that wouldn't fix the default theme.
*** Bug 422065 has been marked as a duplicate of this bug. ***
Created attachment 97067 [details] [review] rb-dont-escape-primary-in-nots.patch Don't escape the primary text, as per the spec.
The notification-daemon patch for the standard theme is at: http://cvs.fedoraproject.org/viewcvs/rpms/notification-daemon/devel/notification-daemon-0.3.7-summary-markup.patch?view=markup The bubble theme already escapes the text as it should.
This is obviously correct, and I'm apparently some kind of bonehead for not reading the spec. Thanks.
2007-10-25 Bastien Nocera <hadess@hadess.net> * shell/rb-shell.c: (rb_shell_construct_notify_titles): Don't escape the primary text for the notification popup, as the spec says we shouldn't, fix "&" showing up in the notification popup (Closes: #445659)
Unfortunately this has the side-effect that the title now disappears (or doesn't change from the previous track if there was a previous track played) in the tooltip when you mouse over the rhythmbox icon in the panel, with the warning message: 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 & There needs to be some way to distinguish between the text for the notification and the text for the tooltip.
(In reply to comment #12) > Unfortunately this has the side-effect that the title now disappears (or > doesn't change from the previous track if there was a previous track played) in > the tooltip when you mouse over the rhythmbox icon in the panel, with the > warning message: > > 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 & > > There needs to be some way to distinguish between the text for the notification > and the text for the tooltip. Good catch. Does this work for you?
Created attachment 97894 [details] [review] rb-dont-escape-primary-in-nots-2.patch
That fixes it for me.
2007-10-29 Bastien Nocera <hadess@hadess.net> * shell/rb-shell.c: (rb_shell_playing_entry_changed_cb), (rb_shell_player_window_title_changed_cb): * shell/rb-tray-icon.c: (rb_tray_icon_set_tooltip_primary_text): * shell/rb-tray-icon.h: Fix escaping of tooltips (Closes: #445659)
See also http://bugzilla.gnome.org/show_bug.cgi?id=498081#c5
*** Bug 500285 has been marked as a duplicate of this bug. ***
*** Bug 511963 has been marked as a duplicate of this bug. ***
*** Bug 550455 has been marked as a duplicate of this bug. ***