# HG changeset patch # User Sean Egan # Date 1070425766 0 # Node ID 9f6dc7b4fc5733db1a914c6b72da4d08adb5bac6 # Parent 3d9d3d21e600229959d208018ba56655fc404889 [gaim-migrate @ 8360] I didn't do this earlier, because I figured people would still want to add their own HTML tags using CVS, but I strongly doubt anyone will be hit with the overwhelming desire to manually change the font size in an IM until that gets implemented. I'm escaping HTML now. This will only happen with protocols that support HTML, other protocols will receive just the text in the box. When the toolbar gets widgetized, it will become desensitive when the current account does not support HTML. Also, because it's been asked of me, your default outgoing font will be set in the wysiwyg entry widget, and ctrl-up will show the correct formatting. committer: Tailor Script diff -r 3d9d3d21e600 -r 9f6dc7b4fc57 src/gtkconv.c --- a/src/gtkconv.c Wed Dec 03 04:17:42 2003 +0000 +++ b/src/gtkconv.c Wed Dec 03 04:29:26 2003 +0000 @@ -377,8 +377,11 @@ GaimConnection *gc = gaim_conversation_get_gc(conv); gtkconv = GAIM_GTK_CONVERSATION(conv); - - buf2 = gtk_imhtml_get_markup(GTK_IMHTML(gtkconv->entry)); + + if (gc && gc->flags & GAIM_CONNECTION_HTML) + buf2 = gtk_imhtml_get_markup(GTK_IMHTML(gtkconv->entry)); + else + buf2 = gtk_imhtml_get_text(GTK_IMHTML(gtkconv->entry)); /* set_toggle(gtkconv->toolbar.bold, FALSE); set_toggle(gtkconv->toolbar.italic, FALSE); diff -r 3d9d3d21e600 -r 9f6dc7b4fc57 src/gtkimhtml.c --- a/src/gtkimhtml.c Wed Dec 03 04:17:42 2003 +0000 +++ b/src/gtkimhtml.c Wed Dec 03 04:29:26 2003 +0000 @@ -2228,7 +2228,15 @@ } } - + + if (c == '<') + str = g_string_append(str, "<"); + else if (c == '>') + str = g_string_append(str, ">"); + else if (c == '&') + str = g_string_append(str, "&"); + else if (c == '"') + str = g_string_append(str, """); str = g_string_append_unichar(str, c); } gtk_text_iter_forward_char(&iter);