Mercurial > pidgin
comparison src/util.c @ 11176:6932df31225f
[gaim-migrate @ 13283]
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.
committer: Tailor Script <tailor@pidgin.im>
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Sun, 31 Jul 2005 15:21:31 +0000 |
parents | 8e600ee6ec61 |
children | 237d65590d2b |
comparison
equal
deleted
inserted
replaced
11175:57af14280b5f | 11176:6932df31225f |
---|---|
1617 t = c; | 1617 t = c; |
1618 while (flag) { | 1618 while (flag) { |
1619 /* iterate backwards grabbing the local part of an email address */ | 1619 /* iterate backwards grabbing the local part of an email address */ |
1620 g = g_utf8_get_char(t); | 1620 g = g_utf8_get_char(t); |
1621 if (badchar(*t) || (g >= 127) || (*t == '(') || | 1621 if (badchar(*t) || (g >= 127) || (*t == '(') || |
1622 ((*t == ';') && (t > (text+2)) && !g_ascii_strncasecmp(t - 3, "<", 4))) { | 1622 ((*t == ';') && ((t > (text+2) && (!g_ascii_strncasecmp(t - 3, "<", 4) || |
1623 !g_ascii_strncasecmp(t - 3, ">", 4))) || | |
1624 (t > (text+4) && (!g_ascii_strncasecmp(t - 5, """, 6)))))) { | |
1623 /* local part will already be part of ret, strip it out */ | 1625 /* local part will already be part of ret, strip it out */ |
1624 ret = g_string_truncate(ret, ret->len - (c - t)); | 1626 ret = g_string_truncate(ret, ret->len - (c - t)); |
1625 ret = g_string_append_unichar(ret, g); | 1627 ret = g_string_append_unichar(ret, g); |
1626 break; | 1628 break; |
1627 } else { | 1629 } else { |