[gnome-system-tools/gnome-2-30] Escape user name and login before passing it to tree view



commit 2651c299640f9193e529a8e596d5be39af9a1050
Author: Milan Bouchet-Valat <nalimilan club fr>
Date:   Mon May 24 11:15:54 2010 +0200

    Escape user name and login before passing it to tree view
    
    Real name may contain almost any character, including XML markup, which breaks the GtkCellRendererText.

 src/users/users-table.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/users/users-table.c b/src/users/users-table.c
index 64101a4..632a58d 100644
--- a/src/users/users-table.c
+++ b/src/users/users-table.c
@@ -191,7 +191,8 @@ users_table_set_user (OobsUser *user, GtkTreeIter *iter)
 	if (!name)
 		name = login;
 
-	label = g_strdup_printf ("<big><b>%s</b>\n<span color=\'dark grey\'><i>%s</i></span></big>", name, login);
+	label = g_markup_printf_escaped ("<big><b>%s</b>\n<span color=\'dark grey\'><i>%s</i></span></big>",
+	                                 name, login);
 
 	gtk_list_store_set (GTK_LIST_STORE (model), iter,
 			    COL_USER_FACE, face,



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