[gdm/gnome-2-30] Escape user's name before adding to chooser
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm/gnome-2-30] Escape user's name before adding to chooser
- Date: Tue, 20 Jul 2010 18:39:00 +0000 (UTC)
commit b2f79db8cee486964f562e818e2bf96a420e7965
Author: Ray Strode <rstrode redhat com>
Date: Tue Jul 20 14:35:46 2010 -0400
Escape user's name before adding to chooser
This is like commit b4a1d0e19b22714719bdf0560b1db4ff1b43042b
but more targeted to the user chooser.
https://bugzilla.gnome.org/show_bug.cgi?id=619588
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 8397f40..b7bd0a0 100644
--- a/gui/simple-greeter/gdm-user-chooser-widget.c
+++ b/gui/simple-greeter/gdm-user-chooser-widget.c
@@ -460,6 +460,8 @@ add_user (GdmUserChooserWidget *widget,
GdkPixbuf *pixbuf;
char *tooltip;
gboolean is_logged_in;
+ char *escaped_username;
+ char *escaped_real_name;
if (!widget->priv->show_normal_users) {
return;
@@ -472,16 +474,20 @@ add_user (GdmUserChooserWidget *widget,
is_logged_in = gdm_user_is_logged_in (user);
+ 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_add_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,
(GdmChooserWidgetItemLoadFunc) on_item_load,
widget);
+ 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]