changeset 10733:d5f2ebf79429

[gaim-migrate @ 12335] " This fixes one of the bugs decadix found. The symptom was an empty box with two buttons: Cancel and Accept. For this one, I believe the escaping belongs in this function and not the prpls because that's how the escaping was being done for message. I just added escaping on two other variables." --rlaager committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Sat, 26 Mar 2005 03:08:03 +0000
parents c4cb90065e1d
children 8b2c81d9b271
files src/server.c
diffstat 1 files changed, 9 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/server.c	Sat Mar 26 02:43:49 2005 +0000
+++ b/src/server.c	Sat Mar 26 03:08:03 2005 +0000
@@ -1153,6 +1153,8 @@
 	GaimAccount *account;
 	char buf2[BUF_LONG];
 	struct chat_invite_data *cid = g_new0(struct chat_invite_data, 1);
+	char *name_escaped = g_markup_escape_text(name, -1);
+	char *who_escaped = g_markup_escape_text(who, -1);
 
 	account = gaim_connection_get_account(gc);
 
@@ -1161,16 +1163,19 @@
 
 	if (message != NULL)
 	{
-		char *escaped = g_markup_escape_text(message, -1);
+		char *message_escaped = g_markup_escape_text(message, -1);
 		g_snprintf(buf2, sizeof(buf2),
 				   _("%s has invited %s to the chat room %s:\n<b>%s</b>"),
-				   who, gaim_account_get_username(account), name, escaped);
-		g_free(escaped);
+				   who_escaped, gaim_account_get_username(account), name_escaped, message_escaped);
+		g_free(message_escaped);
 	}
 	else
 		g_snprintf(buf2, sizeof(buf2),
 				   _("%s has invited %s to the chat room %s\n"),
-				   who, gaim_account_get_username(account), name);
+				   who_escaped, gaim_account_get_username(account), name_escaped);
+
+	g_free(name_escaped);
+	g_free(who_escaped);
 
 	cid->gc = gc;
 	cid->components = data;