From: Luke S. <lsc...@us...> - 2004-05-13 12:25:24
|
Update of /cvsroot/gaim/gaim/src/protocols/msn In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24627/src/protocols/msn Modified Files: utils.c Log Message: "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 Index: utils.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/msn/utils.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -p -r1.15 -r1.16 --- utils.c 18 Apr 2004 03:27:33 -0000 1.15 +++ utils.c 13 May 2004 12:25:07 -0000 1.16 @@ -238,11 +238,15 @@ msn_import_html(const char *html, char * 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 @@ msn_import_html(const char *html, char * 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++; } |