changeset 8493:244a49ab79ef

[gaim-migrate @ 9228] Kid tested mother approved. Recieving stuff like <I'm elite> from ICQ users should work again. It's true. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Tue, 23 Mar 2004 23:23:52 +0000
parents 5ab3888ec58b
children 8a1421dcef60
files src/protocols/oscar/oscar.c
diffstat 1 files changed, 16 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/oscar/oscar.c	Tue Mar 23 22:23:28 2004 +0000
+++ b/src/protocols/oscar/oscar.c	Tue Mar 23 23:23:52 2004 +0000
@@ -2358,7 +2358,13 @@
 		}
 	}
 
-	/* gaim_str_strip_cr(tmp); */
+	/* If the message came from an ICQ user then escape any HTML */
+	if (isdigit(userinfo->sn[0])) {
+		gchar *tmp2 = gaim_escape_html(tmp);
+		g_free(tmp);
+		tmp = tmp2;
+	}
+
 	serv_got_im(gc, userinfo->sn, tmp, flags, time(NULL));
 	g_free(tmp);
 
@@ -2676,6 +2682,14 @@
 		case 0x01: { /* MacICQ message or basic offline message */
 			if (i >= 1) {
 				gchar *uin = g_strdup_printf("%u", args->uin);
+				gchar *tmp;
+
+				/* If the message came from an ICQ user then escape any HTML */
+				if (isdigit(userinfo->sn[0]))
+					tmp = gaim_escape_html(msg2[0]);
+				else
+					tmp = g_strdup(msg2[0]);
+
 				if (t) { /* This is an offline message */
 					/* I think this timestamp is in UTC, or something */
 					serv_got_im(gc, uin, msg2[0], 0, t);
@@ -2683,6 +2697,7 @@
 					serv_got_im(gc, uin, msg2[0], 0, time(NULL));
 				}
 				g_free(uin);
+				g_free(tmp);
 			}
 		} break;