changeset 8922:9a62b8e3b23b

[gaim-migrate @ 9692] " This fix sending & " and such characters in chats and also to ourselves." --Felipe Contreras committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Thu, 13 May 2004 17:20:42 +0000
parents 538a78ff9fdb
children 3ea82ab12cb9
files src/protocols/msn/msn.c
diffstat 1 files changed, 9 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/msn/msn.c	Thu May 13 12:25:07 2004 +0000
+++ b/src/protocols/msn/msn.c	Thu May 13 17:20:42 2004 +0000
@@ -593,11 +593,8 @@
 		 * In MSN, you can't send messages to yourself, so
 		 * we'll fake like we received it ;)
 		 */
-		gchar *fakemsg = gaim_escape_html(message);
 		serv_got_typing_stopped(gc, (char *)who);
-		serv_got_im(gc, who, fakemsg, flags,
-					time(NULL));
-		g_free(fakemsg);
+		serv_got_im(gc, who, message, flags, time(NULL));
 	}
 
 	return 1;
@@ -1069,7 +1066,8 @@
 	MsnSession *session;
 	MsnSwitchBoard *swboard;
 	MsnMessage *msg;
-	char *send, *recv;
+	char *msgformat;
+	char *msgtext;
 
 	account = gaim_connection_get_account(gc);
 	session = gc->proto_data;
@@ -1078,23 +1076,21 @@
 	if (swboard == NULL)
 		return -EINVAL;
 
-	send = gaim_str_add_cr(message);
+	msn_import_html(message, &msgformat, &msgtext);
 
 	msg = msn_message_new();
-	msn_message_set_attr(msg, "X-MMS-IM-Format",
-						 "FN=MS%20Sans%20Serif; EF=; CO=0; PF=0");
-	msn_message_set_body(msg, send);
+	msn_message_set_attr(msg, "X-MMS-IM-Format", msgformat);
+	msn_message_set_body(msg, msgtext);
 
-	g_free(send);
+	g_free(msgformat);
+	g_free(msgtext);
 
 	msn_switchboard_send_msg(swboard, msg);
 
 	msn_message_destroy(msg);
 
-	recv = gaim_escape_html(message);
 	serv_got_chat_in(gc, id, gaim_account_get_username(account),
-					 0, recv, time(NULL));
-	g_free(recv);
+					 0, message, time(NULL));
 
 	return 0;
 }