--- a/src/protocols/oscar/oscar.c Sun Apr 03 21:42:11 2005 -0400
+++ b/src/protocols/oscar/oscar.c Sun Apr 03 22:44:03 2005 -0400
@@ -3337,9 +3337,10 @@
tmp = g_string_free(message, FALSE);
- * If the message is being received by an ICQ user then escape any HTML,
+ * If the message is from an ICQ user and to an ICQ user then escape any HTML, * because HTML is not sent over ICQ as a means to format a message.
- * so any HTML we receive is intended to be displayed
+ * So any HTML we receive is intended to be displayed. Also, \r\n must be * Note: There *may* be some clients which send messages as HTML formatted -
* they need to be special-cased somehow.
@@ -3349,6 +3350,9 @@
gchar *tmp2 = gaim_escape_html(tmp);
+ tmp2 = gaim_strreplace(tmp, "\r\n", "<br>"); serv_got_im(gc, userinfo->sn, tmp, flags, time(NULL));
@@ -5407,7 +5411,7 @@
struct oscar_direct_im *dim = oscar_direct_im_find(od, name);
const char *iconfile = gaim_account_get_buddy_icon(gaim_connection_get_account(gc));
- char *tmpmsg = NULL, *tmpmsg2 = NULL;
if (dim && dim->connected) {
/* If we're directly connected, send a direct IM */
@@ -5486,27 +5490,19 @@
- * If we're IMing an ICQ user then send newlines as CR/LF and
+ * If we're IMing an ICQ user from an ICQ account, then strip HTML + * and use \r\n as the newline character. - if (isdigit(name[0]) ) {
- /* being sent to an ICQ user */
- if (!isdigit(gaim_account_get_username(gc->account)[0])) {
- /* from an AIM user - ICQ receiving from AIM *expects the messsage to be HTML formatted* */
- tmpmsg = gaim_str_add_cr(message);
- /* from an ICQ user - do nothing */
+ if ((isdigit(gaim_account_get_username(gc->account)[0]))) { tmpmsg = g_strdup(message);
+ tmpmsg = gaim_escape_html(message); - /* being sent to an AIM user */
- if (isdigit(gaim_account_get_username(gc->account)[0])) {
- tmpmsg2 = gaim_strdup_withhtml(message);
- tmpmsg = gaim_escape_html(tmpmsg2);
- tmpmsg = gaim_strdup_withhtml(message);
+ /* From AIM to AIM and AIM to ICQ */ + tmpmsg = g_strdup(message);