GNOME Bugzilla – Bug 498081
Notification doesn't show text if track title contain "&" character
Last modified: 2007-11-19 13:21:17 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
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
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.
*** Bug 498143 has been marked as a duplicate of this bug. ***
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 < or & 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.
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.
ahh, ok, thanks for the clarification, i didn't notice that.