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/standard/theme.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/themes/standard') diff --git a/src/themes/standard/theme.c b/src/themes/standard/theme.c index ba44fcd..f13d174 100644 --- a/src/themes/standard/theme.c +++ b/src/themes/standard/theme.c @@ -857,9 +857,16 @@ void 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); - gtk_label_set_markup(GTK_LABEL(windata->body_label), quoted); - g_free(quoted); + if (strstr(body, "&") || strstr(body, "<") || strstr(body, ">") || strstr(body, "'") || strstr(body, """)) + { + gtk_label_set_markup(GTK_LABEL(windata->body_label), body); + } + else + { + quoted = g_markup_escape_text(body, -1); + gtk_label_set_markup(GTK_LABEL(windata->body_label), quoted); + g_free(quoted); + } if (body == NULL || *body == '\0') { -- cgit v1.2.1