From 6dd7a7237dceefd83deb8be94744b7182d173492 Mon Sep 17 00:00:00 2001 From: Jason Conti Date: Mon, 29 Aug 2016 14:46:50 -0400 Subject: * Need to escape the url otherwise certain acceptable characters can break the markup parsing in the GtkLabel. * Bump version. --- src/notification-menuitem.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/notification-menuitem.c b/src/notification-menuitem.c index 2fbe11c..840885e 100644 --- a/src/notification-menuitem.c +++ b/src/notification-menuitem.c @@ -350,11 +350,17 @@ notification_menuitem_markup_body(const gchar *body) gchar **str_array = g_new0(gchar *, len + 1); guint i = 0; GList *item; + gchar *escaped_text; + gchar *escaped_expanded; for (item = list; item; item = item->next, i++) { MatchGroup *group = (MatchGroup *)item->data; if (group->type == MATCHED) { - str_array[i] = g_strdup_printf("%s", group->expanded, group->text); + escaped_text = g_markup_escape_text(group->text, -1); + escaped_expanded = g_markup_escape_text(group->expanded, -1); + str_array[i] = g_strdup_printf("%s", escaped_expanded, escaped_text); + g_free(escaped_text); + g_free(escaped_expanded); } else { str_array[i] = g_markup_escape_text(group->text, -1); -- cgit v1.2.3