# HG changeset patch # User Luke Schierer # Date 1084451107 0 # Node ID 538a78ff9fdb797fe93e3575f0fb237c09d9a2c2 # Parent 87fcb56feeca95f0600e771ab67105a765a178f1 [gaim-migrate @ 9691] "MSN fix for sending certain copy-pasted text This basically does that. Send any thext from the paragraphs in http://gaim.sourceforge.net/about.php and you'll see the problem. In msn we can't send multiple font faced formatted text. So this one fixes that." --Felipe Contreras committer: Tailor Script diff -r 87fcb56feeca -r 538a78ff9fdb src/protocols/msn/utils.c --- a/src/protocols/msn/utils.c Wed May 12 03:45:42 2004 +0000 +++ b/src/protocols/msn/utils.c Thu May 13 12:25:07 2004 +0000 @@ -238,11 +238,15 @@ else if (!g_ascii_strncasecmp(c, "face=\"", 6)) { const char *end = NULL; + const char *comma = NULL; unsigned int namelen = 0; c += 6; end = strchr(c, '\"'); - namelen = (unsigned int)(end - c); + comma = strchr(c, ','); + + namelen = (unsigned int)((comma != NULL ? comma : end) - c); + fontface = g_strndup(c, namelen); c = end + 2; } @@ -262,21 +266,31 @@ c++; } - } else if (*c == '&') { - if (!g_ascii_strncasecmp(c, "<", 4)) { + } + else if (*c == '&') + { + if (!g_ascii_strncasecmp(c, "<", 4)) + { msg[retcount++] = '<'; c += 4; - } else if (!g_ascii_strncasecmp(c, ">", 4)) { + } + else if (!g_ascii_strncasecmp(c, ">", 4)) + { msg[retcount++] = '>'; c += 4; - } else if (!g_ascii_strncasecmp(c, """, 6)) { + } + else if (!g_ascii_strncasecmp(c, """, 6)) + { msg[retcount++] = '"'; c += 6; - } else if (!g_ascii_strncasecmp(c, "&", 5)) { + } + else if (!g_ascii_strncasecmp(c, "&", 5)) + { msg[retcount++] = '&'; c += 5; } - } else + } + else msg[retcount++] = *c++; }