[gdm] More username escape fixes



commit 023e18da99800b6b8cec66451c3914678d67f14c
Author: Ray Strode <rstrode redhat com>
Date:   Fri Aug 13 11:20:09 2010 -0400

    More username escape fixes
    
    commit 7a6173d6032bd13647f55e94c85c293f7d2516ec fixed the
    "add_item" case but not the "update_item" case. This commit
    addresses that.
    
    http://bugzilla.gnome.org/show_bug.cgi?id=624847
    (cherry picked from commit f9996fb5412beeef293b542c0640b69f1f7a0eaa)

 gui/simple-greeter/gdm-user-chooser-widget.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/gui/simple-greeter/gdm-user-chooser-widget.c b/gui/simple-greeter/gdm-user-chooser-widget.c
index 06799d1..211b033 100644
--- a/gui/simple-greeter/gdm-user-chooser-widget.c
+++ b/gui/simple-greeter/gdm-user-chooser-widget.c
@@ -182,6 +182,8 @@ update_item_for_user (GdmUserChooserWidget *widget,
         char         *tooltip;
         gboolean      is_logged_in;
         int           size;
+        char         *escaped_username;
+        char         *escaped_real_name;
 
 
         size = get_icon_height_for_widget (GTK_WIDGET (widget));
@@ -201,14 +203,18 @@ update_item_for_user (GdmUserChooserWidget *widget,
                  is_logged_in,
                  pixbuf);
 
+        escaped_username = g_markup_escape_text (gdm_user_get_user_name (user), -1);
+        escaped_real_name = g_markup_escape_text (gdm_user_get_real_name (user), -1);
         gdm_chooser_widget_update_item (GDM_CHOOSER_WIDGET (widget),
-                                        gdm_user_get_user_name (user),
+                                        escaped_username,
                                         pixbuf,
-                                        gdm_user_get_real_name (user),
+                                        escaped_real_name,
                                         tooltip,
                                         gdm_user_get_login_frequency (user),
                                         is_logged_in,
                                         FALSE);
+        g_free (escaped_real_name);
+        g_free (escaped_username);
         g_free (tooltip);
 
         if (pixbuf != NULL) {



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