changeset 13509:56abb67edec9

[gaim-migrate @ 15885] SF Patch #1446694 from Sadrul "When you start editing the alias of a buddy with weird (non-ascii) characters in it, the text for that node (and sometimes an adjacent row) get corrupted. This patch fixes that." committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Tue, 14 Mar 2006 07:25:54 +0000
parents 9710aeb12c0d
children 65486b7e8e45
files src/gtkblist.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkblist.c	Tue Mar 14 07:15:43 2006 +0000
+++ b/src/gtkblist.c	Tue Mar 14 07:25:54 2006 +0000
@@ -339,6 +339,7 @@
 	GtkTreeIter iter;
 	GtkTreePath *path;
 	const char *text = NULL;
+	char *esc;
 
 	if (!(get_iter_from_node(node, &iter))) {
 		/* This is either a bug, or the buddy is in a collapsed contact */
@@ -365,7 +366,9 @@
 		g_return_if_reached();
 	}
 
-	gtk_tree_store_set(gtkblist->treemodel, &iter, NAME_COLUMN, text, -1);
+	esc = g_markup_escape_text(text, -1);
+	gtk_tree_store_set(gtkblist->treemodel, &iter, NAME_COLUMN, esc, -1);
+	g_free(esc);
 
 	path = gtk_tree_model_get_path(GTK_TREE_MODEL(gtkblist->treemodel), &iter);
 	g_object_set(G_OBJECT(gtkblist->text_rend), "editable", TRUE, NULL);