[network-manager-applet/nma-1-0] c-e: XML escape connection id in GTK connection list



commit c64c87049ff8611bc24f7fafe03ba73af126d542
Author: Thomas Haller <thaller redhat com>
Date:   Wed Jan 20 09:18:38 2016 +0100

    c-e: XML escape connection id in GTK connection list
    
    https://bugzilla.gnome.org/show_bug.cgi?id=760866
    (cherry picked from commit 6f19339a098094920578425699c38e1ab7c1f90f)

 src/connection-editor/nm-connection-list.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/connection-editor/nm-connection-list.c b/src/connection-editor/nm-connection-list.c
index bc0844f..52dd4df 100644
--- a/src/connection-editor/nm-connection-list.c
+++ b/src/connection-editor/nm-connection-list.c
@@ -799,7 +799,7 @@ connection_added (NMRemoteSettings *settings,
        NMConnectionList *self = NM_CONNECTION_LIST (user_data);
        GtkTreeIter parent_iter, iter;
        NMSettingConnection *s_con;
-       char *last_used;
+       char *last_used, *id;
        gboolean expand = TRUE;
 
        if (!get_parent_iter_for_connection (self, connection, &parent_iter))
@@ -809,14 +809,17 @@ connection_added (NMRemoteSettings *settings,
 
        last_used = format_last_used (nm_setting_connection_get_timestamp (s_con));
 
+       id = g_markup_escape_text (nm_setting_connection_get_id (s_con), -1);
+
        gtk_tree_store_append (GTK_TREE_STORE (self->model), &iter, &parent_iter);
        gtk_tree_store_set (GTK_TREE_STORE (self->model), &iter,
-                           COL_ID, nm_setting_connection_get_id (s_con),
+                           COL_ID, id,
                            COL_LAST_USED, last_used,
                            COL_TIMESTAMP, nm_setting_connection_get_timestamp (s_con),
                            COL_CONNECTION, connection,
                            -1);
 
+       g_free (id);
        g_free (last_used);
 
        if (self->displayed_type) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]