diff options
author | kajzer <[email protected]> | 2016-09-09 18:35:48 +0200 |
---|---|---|
committer | kajzer <[email protected]> | 2016-09-09 18:35:48 +0200 |
commit | a550bac7a423943b79b98c322d665cef6f16e759 (patch) | |
tree | a30b2df0aac94438f9108d326f020ed5376f5759 /src/themes/standard | |
parent | 23153c2e82294cda4f3f7db2053186da8581e19a (diff) | |
download | mate-notification-daemon-a550bac7a423943b79b98c322d665cef6f16e759.tar.bz2 mate-notification-daemon-a550bac7a423943b79b98c322d665cef6f16e759.tar.xz |
Fix: properly escape text
Diffstat (limited to 'src/themes/standard')
-rw-r--r-- | src/themes/standard/theme.c | 13 |
1 files changed, 10 insertions, 3 deletions
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') { |