From a550bac7a423943b79b98c322d665cef6f16e759 Mon Sep 17 00:00:00 2001 From: kajzer Date: Fri, 9 Sep 2016 18:35:48 +0200 Subject: Fix: properly escape text --- src/themes/coco/coco-theme.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/themes/coco/coco-theme.c') diff --git a/src/themes/coco/coco-theme.c b/src/themes/coco/coco-theme.c index ca742b4..c1fa929 100644 --- a/src/themes/coco/coco-theme.c +++ b/src/themes/coco/coco-theme.c @@ -506,10 +506,16 @@ set_notification_text(GtkWindow *nw, const char *summary, const char *body) gtk_label_set_markup(GTK_LABEL(windata->summary_label), str); g_free(str); - quoted = g_markup_escape_text(body, -1); - str = g_strdup_printf( - "%s", quoted); - g_free(quoted); + if (strstr(body, "&") || strstr(body, "<") || strstr(body, ">") || strstr(body, "'") || strstr(body, """)) + { + str = g_strdup_printf("%s", body); + } + else + { + quoted = g_markup_escape_text(body, -1); + str = g_strdup_printf("%s", quoted); + g_free(quoted); + } gtk_label_set_markup (GTK_LABEL (windata->body_label), str); g_free(str); -- cgit v1.2.1