Update of /cvsroot/gaim/gaim/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24405
Modified Files:
Tag: oldstatus
util.c
Log Message:
Fix a buglet in auto linkifying mailto: things, which was causing the
MSN prpl to have kittens trying to parse what was being sent.
Also fixup the MSN parsing code to be more accomodating in what it
accepts from the core - as this code was originally borrowed from the
Zephyr prpl, robustify Zephyr in a similar way.
Unfortunately I have no way of testing the Zephyr fixes.
Index: util.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/util.c,v
retrieving revision 1.325.2.24
retrieving revision 1.325.2.25
diff -u -d -p -r1.325.2.24 -r1.325.2.25
--- util.c 24 Jul 2005 19:27:34 -0000 1.325.2.24
+++ util.c 31 Jul 2005 15:21:01 -0000 1.325.2.25
@@ -1614,7 +1614,9 @@ gaim_markup_linkify(const char *text)
/* iterate backwards grabbing the local part of an email address */
g = g_utf8_get_char(t);
if (badchar(*t) || (g >= 127) || (*t == '(') ||
- ((*t == ';') && (t > (text+2)) && !g_ascii_strncasecmp(t - 3, "<", 4))) {
+ ((*t == ';') && ((t > (text+2) && (!g_ascii_strncasecmp(t - 3, "<", 4) ||
+ !g_ascii_strncasecmp(t - 3, ">", 4))) ||
+ (t > (text+4) && (!g_ascii_strncasecmp(t - 5, """, 6)))))) {
/* local part will already be part of ret, strip it out */
ret = g_string_truncate(ret, ret->len - (c - t));
ret = g_string_append_unichar(ret, g);
|