diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2007-06-29 15:02:14 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@src.gnome.org> | 2007-06-29 15:02:14 +0000 |
commit | 41aaca420dfe37a2513c3c340e743d5d1d7c6a04 (patch) | |
tree | 18e6d2af54e76e98e66376422bed7f7359e497ce /gtk/gtkrecentchooserdefault.c | |
parent | 612d8729a2929c671a19cd6259531ad220329987 (diff) | |
download | gtk+-41aaca420dfe37a2513c3c340e743d5d1d7c6a04.tar.gz |
Escape markup entities in the name and URI before displaying them.
2007-06-29 Emmanuele Bassi <ebassi@gnome.org>
* gtk/gtkrecentchooserdefault.c (recent_meta_data_func): Escape
markup entities in the name and URI before displaying them.
svn path=/trunk/; revision=18289
Diffstat (limited to 'gtk/gtkrecentchooserdefault.c')
-rw-r--r-- | gtk/gtkrecentchooserdefault.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/gtk/gtkrecentchooserdefault.c b/gtk/gtkrecentchooserdefault.c index 26a44a0234..c1a3ff7231 100644 --- a/gtk/gtkrecentchooserdefault.c +++ b/gtk/gtkrecentchooserdefault.c @@ -973,8 +973,8 @@ recent_meta_data_func (GtkTreeViewColumn *tree_column, gpointer user_data) { GtkRecentInfo *info = NULL; - gchar *uri, *name; - gchar *str; + gchar *uri, *name, *str; + gchar *escaped_name, *escaped_location; gtk_tree_model_get (model, iter, RECENT_DISPLAY_NAME_COLUMN, &name, @@ -987,12 +987,17 @@ recent_meta_data_func (GtkTreeViewColumn *tree_column, if (!name) name = gtk_recent_info_get_short_name (info); - str = g_strconcat ("<b>", name, "</b>\n", - "<small>", _("Location:"), " ", uri, "</small>", - NULL); + escaped_name = g_markup_printf_escaped ("<b>%s</b>", name); + escaped_location = g_markup_printf_escaped ("<small>%s: %s</small>", + _("Location"), + uri); + str = g_strjoin ("\n", escaped_name, escaped_location, NULL); + g_free (escaped_name); + g_free (escaped_location); g_object_set (cell, "markup", str, NULL); + g_free (str); g_free (uri); g_free (name); gtk_recent_info_unref (info); |