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 498081 - Notification doesn't show text if track title contain "&" character
Notification doesn't show text if track title contain "&" character
Status: RESOLVED NOTGNOME
Product: rhythmbox
Classification: Other
Component: User Interface
unspecified
Other Linux
: Normal normal
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
: 498143 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-11-19 05:08 UTC by Basilio Kublik
Modified: 2007-11-19 13:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
escape song title before including it into the notification widget (845 bytes, patch)
2007-11-19 05:14 UTC, Basilio Kublik
rejected Details | Review

Description Basilio Kublik 2007-11-19 05:08:01 UTC
This issue is quite similar to the one described in gnome-screensaver report at bug #494598, the problem lays in the lack of escaping in the text send as notification, because of this libnotify try to interpret it as xml information and not plain text hence shows an empty line instead of the desired text (track title), this doesn't happens for the artist nor album line of the notification.

for some reason i can only reproduce with the ampersand punctuation mark and not with < and > symbols.

i was able to reproduce this behavior in rhythmbox 0.11.3 and svn trunk
Comment 1 Basilio Kublik 2007-11-19 05:14:52 UTC
Created attachment 99316 [details] [review]
escape song title before including it into the notification widget

just escape the song title, since artist and album line doesn't seems affected and escaping them, cause the italic xml tags be shown as plain text.

hope this helps
Comment 2 Jonathan Matthew 2007-11-19 09:56:12 UTC
This is actually a bug in the notification theme you're using:  http://trac.galago-project.org/ticket/132

The notification spec only says that the body text can contain markup, not the summary text:  http://www.galago-project.org/specs/notification/0.9/x81.html
So, the summary text should not be escaped.
Comment 3 Bastien Nocera 2007-11-19 10:21:12 UTC
*** Bug 498143 has been marked as a duplicate of this bug. ***
Comment 4 Basilio Kublik 2007-11-19 12:43:06 UTC
Hi Jonathan
There are several reports about this issue at the galago-project bug tracker, and their position about this issue is sort of "the other guys should fix this in their code", for instance in http://trac.galago-project.org/ticket/83 they close the report as invalid arguing that the text must be escaped before send it as notification.

I really do think this issue should be fixed in libnotify, but since it seems that they won't do it, i really don't see much harm in making sure that it will work for everyone by doing the escaping inside rhythmbox, taking in consideration that we're talking about "song titles" which came inside of audio files, and no one, or at least the vast majority of the people don't use &lt; or &amp; instead of the less than, and ampersand symbol in the audio file tags.

Hope you don't see this as pressing too much, but i would like to see this issue solved even if this meant rhythmbox taking attributions that doesn't necessary deserve.

Thanks for your consideration.
Comment 5 Jonathan Matthew 2007-11-19 13:01:18 UTC
http://trac.galago-project.org/ticket/83 refers to the body, where markup *is* allowed.  The client therefore must escape the body text.

http://trac.galago-project.org/ticket/132 refers to the summary, where markup is not allowed.  The client therefore should not have to escape the summary text.  The fix for the standard notification theme (which previously did not escape the summary text) will be in the next notification-daemon release.

Comment 6 Basilio Kublik 2007-11-19 13:21:17 UTC
ahh, ok, thanks for the clarification, i didn't notice that.