[network-manager-applet] c-e: XML escape connection-types in GTK connection list
- From: Thomas Haller <thaller src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet] c-e: XML escape connection-types in GTK connection list
- Date: Wed, 20 Jan 2016 08:33:29 +0000 (UTC)
commit 0d98aebd80b1ec8da4b55744c3b69932d1c8b97d
Author: Thomas Haller <thaller redhat com>
Date: Wed Jan 20 09:13:51 2016 +0100
c-e: XML escape connection-types in GTK connection list
This might not be a real issue, because usually the type names
are a static set of string. However, they also get translated,
so we better be safe.
src/connection-editor/nm-connection-list.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/connection-editor/nm-connection-list.c b/src/connection-editor/nm-connection-list.c
index 1c912ad..a3d148f 100644
--- a/src/connection-editor/nm-connection-list.c
+++ b/src/connection-editor/nm-connection-list.c
@@ -590,7 +590,7 @@ initialize_treeview (NMConnectionList *self)
GtkTreeSelection *selection;
ConnectionTypeData *types;
GtkTreeIter iter;
- char *id;
+ char *id, *tmp;
int i;
/* Model */
@@ -650,7 +650,11 @@ initialize_treeview (NMConnectionList *self)
/* Fill in connection types */
types = get_connection_type_list ();
for (i = 0; types[i].name; i++) {
- id = g_strdup_printf ("<b>%s</b>", types[i].name);
+
+ tmp = g_markup_escape_text (types[i].name, -1);
+ id = g_strdup_printf ("<b>%s</b>", tmp);
+ g_free (tmp);
+
gtk_tree_store_append (GTK_TREE_STORE (self->model), &iter, NULL);
gtk_tree_store_set (GTK_TREE_STORE (self->model), &iter,
COL_ID, id,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]