diff libpurple/protocols/jabber/message.c @ 29687:42c64c41cf87

propagate from branch 'im.pidgin.pidgin' (head 46523386d682c917679b3de662d51a5bda0da46b) to branch 'im.pidgin.cpw.attention_ui' (head 39d8ac60b05e7766f90db850144c9e963076cec9)
author Marcus Lundblad <ml@update.uu.se>
date Mon, 08 Jun 2009 18:28:31 +0000
parents 33b81994d74c bf9db4c67679
children 8b17877d3294
line wrap: on
line diff
--- a/libpurple/protocols/jabber/message.c	Mon May 25 19:27:33 2009 +0000
+++ b/libpurple/protocols/jabber/message.c	Mon Jun 08 18:28:31 2009 +0000
@@ -1200,7 +1200,9 @@
 			jm->typing_style |= JM_TS_JEP_0022;
 	}
 
-	purple_markup_html_to_xhtml(msg, &xhtml, &jm->body);
+	tmp = purple_utf8_strip_unprintables(msg);
+	purple_markup_html_to_xhtml(tmp, &xhtml, &jm->body);
+	g_free(tmp);
 	tmp = jabber_message_smileyfy_xhtml(jm, xhtml);
 	if (tmp) {
 		g_free(xhtml);
@@ -1241,7 +1243,9 @@
 	jm->to = g_strdup_printf("%s@%s", chat->room, chat->server);
 	jm->id = jabber_get_next_id(jm->js);
 
+	tmp = purple_utf8_strip_unprintables(msg);
 	purple_markup_html_to_xhtml(msg, &xhtml, &jm->body);
+	g_free(tmp);
 	tmp = jabber_message_smileyfy_xhtml(jm, xhtml);
 	if (tmp) {
 		g_free(xhtml);