im.pidgin.pidgin: f28fe5ed42cadd9ebe524e358fa913a04817da8e

sadrul at pidgin.im sadrul at pidgin.im
Fri Oct 12 08:10:38 EDT 2007


-----------------------------------------------------------------
Revision: f28fe5ed42cadd9ebe524e358fa913a04817da8e
Ancestor: 77ba9d4b4fe2122a0368f8a7617be79b8379ea32
Author: sadrul at pidgin.im
Date: 2007-10-12T12:13:39
Branch: im.pidgin.pidgin

Modified files:
        pidgin/plugins/history.c

ChangeLog: 

Another patch from QuLogic. This one makes sure the History plugin properly
escapes the alias.
Closes #3363.

-------------- next part --------------
============================================================
--- pidgin/plugins/history.c	9c684847cf306c078cd215d71546fefefd5642ae
+++ pidgin/plugins/history.c	7594b52fec38678ac634cd4e5cb6b03fbe7f125f
@@ -42,6 +42,7 @@ static void historize(PurpleConversation
 	GtkIMHtmlOptions options = GTK_IMHTML_NO_COLOURS;
 	char *header;
 	char *protocol;
+	char *escaped_alias;
 
 	convtype = purple_conversation_get_type(c);
 	gtkconv = PIDGIN_CONVERSATION(c);
@@ -120,10 +121,12 @@ static void historize(PurpleConversation
 	if (gtk_text_buffer_get_char_count(gtk_text_view_get_buffer(GTK_TEXT_VIEW(gtkconv->imhtml))))
 		gtk_imhtml_append_text(GTK_IMHTML(gtkconv->imhtml), "<BR>", options);
 
-	header = g_strdup_printf(_("<b>Conversation with %s on %s:</b><br>"), alias,
+	escaped_alias = g_markup_escape_text(alias, -1);
+	header = g_strdup_printf(_("<b>Conversation with %s on %s:</b><br>"), escaped_alias,
 							 purple_date_format_full(localtime(&((PurpleLog *)logs->data)->time)));
 	gtk_imhtml_append_text(GTK_IMHTML(gtkconv->imhtml), header, options);
 	g_free(header);
+	g_free(escaped_alias);
 
 	g_strchomp(history);
 	gtk_imhtml_append_text(GTK_IMHTML(gtkconv->imhtml), history, options);


More information about the Commits mailing list