notforwarded 496261
reassign 496261 notification-daemon 0.3.7-1
severity 496261 important
tag 496261 + patch
thanks

Le dimanche 24 août 2008 à 01:33 +0200, Marcel Moreaux a écrit :
> The notifications rhythmbox shows at the start of a new song fail to
> display song names with an ampersand (&) in them. The notification will
> simply have no text where the song name is supposed to go.
> 
> I suspect this is because rhythmbox doesn't escape markup characters,
> causing pango to choke on the lone ampersand, thinking it's the start of
> an entity. Changing the song name of a music file to "Test <s>mp3</s>"
> actually causes the "mp3" part to be rendered strikethrough in the
> notification.

It turns out that notification-daemon doesn’t follow the spec: only the
body can contain markup, not the summary. The attached patch makes it
correct.

http://www.galago-project.org/specs/notification/0.9/x161.html

BTW, why was notification-daemon removed from pkg-gnome? This prevents
me from updating it directly.

Cheers,
-- 
 .''`.
: :' :      We are debian.org. Lower your prices, surrender your code.
`. `'       We will add your hardware and software distinctiveness to
  `-        our own. Resistance is futile.
--- src/themes/standard/theme.c.orig	2008-09-02 15:27:15.362628561 +0200
+++ src/themes/standard/theme.c	2008-09-02 15:28:33.486588589 +0200
@@ -867,10 +867,13 @@
 set_notification_text(GtkWindow *nw, const char *summary, const char *body)
 {
 	char *str;
+	char *escaped;
 	WindowData *windata = g_object_get_data(G_OBJECT(nw), "windata");
 	g_assert(windata != NULL);
 
-	str = g_strdup_printf("<b><big>%s</big></b>", summary);
+	escaped = g_markup_escape_text (summary, -1);
+	str = g_strdup_printf("<b><big>%s</big></b>", escaped);
+	g_free (escaped);
 	gtk_label_set_markup(GTK_LABEL(windata->summary_label), str);
 	g_free(str);
 

Attachment: signature.asc
Description: Ceci est une partie de message numériquement signée

Reply via email to