aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJason Conti <jason.conti@gmail.com>2016-08-29 14:46:50 -0400
committerJason Conti <jason.conti@gmail.com>2016-08-29 14:46:50 -0400
commit6dd7a7237dceefd83deb8be94744b7182d173492 (patch)
tree2b2c76257b164c06a3c112d5a0528e6f1603eaf7 /src
parent700170f70c60fc316f0f310629e42773c818ff84 (diff)
downloadayatana-indicator-notifications-6dd7a7237dceefd83deb8be94744b7182d173492.tar.gz
ayatana-indicator-notifications-6dd7a7237dceefd83deb8be94744b7182d173492.tar.bz2
ayatana-indicator-notifications-6dd7a7237dceefd83deb8be94744b7182d173492.zip
* Need to escape the url otherwise certain acceptable characters can break the0.3.2
markup parsing in the GtkLabel. * Bump version.
Diffstat (limited to 'src')
-rw-r--r--src/notification-menuitem.c8
1 files changed, 7 insertions, 1 deletions
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("<a href=\"%s\">%s</a>", 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("<a href=\"%s\">%s</a>", escaped_expanded, escaped_text);
+ g_free(escaped_text);
+ g_free(escaped_expanded);
}
else {
str_array[i] = g_markup_escape_text(group->text, -1);