changeset 7345:565b5bca5e8a

[gaim-migrate @ 7936] clearing out my tree committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Mon, 27 Oct 2003 05:02:51 +0000
parents 7ba7fedc1d8b
children 15155dbc768a
files po/stats.pl src/protocols/jabber/chat.h src/protocols/jabber/message.c
diffstat 3 files changed, 13 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/po/stats.pl	Mon Oct 27 04:18:44 2003 +0000
+++ b/po/stats.pl	Mon Oct 27 05:02:51 2003 +0000
@@ -21,7 +21,6 @@
 use Locale::Language;
 
 $lang{pt_BR} = "Portuguese (Brizillian)";
-$lang{pt_PT} = "Portuguese (Portugal)";
 $lang{'sr@Latn'} = "Serbian (Latin)";
 $lang{zh_CN} = "Chinese (Simplified)";
 $lang{zh_TW} = "Chinese (Traditional)";
--- a/src/protocols/jabber/chat.h	Mon Oct 27 04:18:44 2003 +0000
+++ b/src/protocols/jabber/chat.h	Mon Oct 27 05:02:51 2003 +0000
@@ -37,6 +37,7 @@
 	int id;
 	GaimConversation *conv;
 	gboolean muc;
+	gboolean xhtml;
 } JabberChat;
 
 GList *jabber_chat_info(GaimConnection *gc);
--- a/src/protocols/jabber/message.c	Mon Oct 27 04:18:44 2003 +0000
+++ b/src/protocols/jabber/message.c	Mon Oct 27 05:02:51 2003 +0000
@@ -460,13 +460,14 @@
 	return 1;
 }
 
-int jabber_message_send_chat(GaimConnection *gc, int id, const char *message)
+int jabber_message_send_chat(GaimConnection *gc, int id, const char *msg)
 {
 	JabberChat *chat;
 	JabberMessage *jm;
 	JabberStream *js = gc->proto_data;
+	char *buf, *xhtml;
 
-	if(!message)
+	if(!msg)
 		return 0;
 
 	chat = jabber_chat_find_by_id(js, id);
@@ -476,7 +477,15 @@
 	jm->type = JABBER_MESSAGE_CHAT;
 	jm->to = g_strdup_printf("%s@%s", chat->room, chat->server);
 
-	gaim_markup_html_to_xhtml(message, &jm->xhtml, &jm->body);
+	buf = g_strdup_printf("<html xmlns='http://jabber.org/protocol/xhtml-im'><body>%s</body></html>", msg);
+
+	gaim_markup_html_to_xhtml(buf, &xhtml, &jm->body);
+	g_free(buf);
+
+	if(chat->xhtml)
+		jm->xhtml = xhtml;
+	else
+		g_free(xhtml);
 
 	jabber_message_send(jm);
 	jabber_message_free(jm);