changeset 13770:9df4a46b0bb3

[gaim-migrate @ 16182] SF Patch #1460287 from Jrme Poulin (ticpu), with a bug fix by Sadrul Currently, with a string like "vnc://ticpu.myftp.org:1/", the "ftp.org:1/" portion will be linkified as an FTP URL. This patch corrects that. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Fri, 12 May 2006 21:50:19 +0000
parents 1afc1b0c4fb3
children 463259ea22ff
files src/util.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/util.c	Fri May 12 20:21:35 2006 +0000
+++ b/src/util.c	Fri May 12 21:50:19 2006 +0000
@@ -1837,7 +1837,7 @@
 				t++;
 
 			}
-		} else if (!g_ascii_strncasecmp(c, "www.", 4)) {
+		} else if (!g_ascii_strncasecmp(c, "www.", 4) && (c == text || badchar(c[-1]) || badentity(c-1))) {
 			if (c[4] != '.') {
 				t = c;
 				while (1) {
@@ -1892,7 +1892,7 @@
 				t++;
 
 			}
-		} else if (!g_ascii_strncasecmp(c, "ftp.", 4)) {
+		} else if (!g_ascii_strncasecmp(c, "ftp.", 4) && (c == text || badchar(c[-1]) || badentity(c-1))) {
 			if (c[4] != '.') {
 				t = c;
 				while (1) {