Mercurial > pidgin.yaz
diff src/util.c @ 3330:af52fdf06166
[gaim-migrate @ 3348]
E-mail addresses are no longer truncated when there is a '.' at the end.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sat, 22 Jun 2002 00:40:47 +0000 |
parents | 86fdd015f40e |
children | 8f69ff64f0bf |
line wrap: on
line diff
--- a/src/util.c Thu Jun 20 04:00:52 2002 +0000 +++ b/src/util.c Sat Jun 22 00:40:47 2002 +0000 @@ -252,7 +252,7 @@ char *tmp; int flag; int len = 0; - char illegal_chars[] = "!@#$%^&*()[]{}/\\<>\":;\0"; + char illegal_chars[] = "!@#$%^&*()[]{}/|\\<>\":;\0"; url_buf[0] = 0; if (*(c - 1) == ' ' || *(c + 1) == ' ' || rindex(illegal_chars, *(c + 1)) @@ -283,15 +283,15 @@ } } - t = c + 1; while (flag) { if (badchar(*t)) { - if (*(t - 1) == '.') { - url_buf[t-c] = '\0'; + while (*(t - 1) == '.') { + url_buf[t - cpy - 1] = '\0'; t--; } + cnt += g_snprintf(&text[cnt], 1024, "<A HREF=\"mailto:%s\">%s</A>", url_buf, url_buf); @@ -308,10 +308,7 @@ } t++; - } - - } if (*c == 0)