changeset 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 e099cf9a9586
children 8f69ff64f0bf
files ChangeLog src/util.c
diffstat 2 files changed, 6 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Jun 20 04:00:52 2002 +0000
+++ b/ChangeLog	Sat Jun 22 00:40:47 2002 +0000
@@ -47,6 +47,8 @@
 	* Can now set the server and port for MSN and Napster
 	* MSN Internationalization (Thanks Felipe Contreras and
 	  countless, countless others)
+	* E-mail addresses are no longer truncated when there is a '.' at
+	  the end.
 
 version 0.58 (05/13/2002):
 	* Bulgarian translation added (Thanks, Igel Itzo)
--- 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)