--- a/mcabber/src/otr.c Mon Apr 13 22:48:48 2009 +0200
+++ b/mcabber/src/otr.c Tue Apr 14 20:36:08 2009 +0200
@@ -408,13 +408,17 @@
char *htmlmsg;
ConnContext * ctx = otr_get_context(buddy);
- htmlmsg = html_escape(*msg);
-
- err = otrl_message_sending(userstate, &ops, NULL, ctx->accountname,
- ctx->protocol, ctx->username, htmlmsg, NULL,
- &newmessage, NULL, NULL);
-
- g_free(htmlmsg);
+ if (ctx->msgstate == OTRL_MSGSTATE_PLAINTEXT)
+ err = otrl_message_sending(userstate, &ops, NULL, ctx->accountname,
+ ctx->protocol, ctx->username, *msg, NULL,
+ &newmessage, NULL, NULL);
+ else {
+ htmlmsg = html_escape(*msg);
+ err = otrl_message_sending(userstate, &ops, NULL, ctx->accountname,
+ ctx->protocol, ctx->username, htmlmsg, NULL,
+ &newmessage, NULL, NULL);
+ g_free(htmlmsg);
+ }
if (err)
*msg = NULL; /*something went wrong, don't send the plain-message! */