comparison src/util.c @ 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 073bc6da6403
children b6967e51f6c4
comparison
equal deleted inserted replaced
13769:1afc1b0c4fb3 13770:9df4a46b0bb3
1835 break; 1835 break;
1836 } 1836 }
1837 t++; 1837 t++;
1838 1838
1839 } 1839 }
1840 } else if (!g_ascii_strncasecmp(c, "www.", 4)) { 1840 } else if (!g_ascii_strncasecmp(c, "www.", 4) && (c == text || badchar(c[-1]) || badentity(c-1))) {
1841 if (c[4] != '.') { 1841 if (c[4] != '.') {
1842 t = c; 1842 t = c;
1843 while (1) { 1843 while (1) {
1844 if (badchar(*t) || badentity(t)) { 1844 if (badchar(*t) || badentity(t)) {
1845 if (t - c == 4) { 1845 if (t - c == 4) {
1890 if (!t) 1890 if (!t)
1891 break; 1891 break;
1892 t++; 1892 t++;
1893 1893
1894 } 1894 }
1895 } else if (!g_ascii_strncasecmp(c, "ftp.", 4)) { 1895 } else if (!g_ascii_strncasecmp(c, "ftp.", 4) && (c == text || badchar(c[-1]) || badentity(c-1))) {
1896 if (c[4] != '.') { 1896 if (c[4] != '.') {
1897 t = c; 1897 t = c;
1898 while (1) { 1898 while (1) {
1899 if (badchar(*t) || badentity(t)) { 1899 if (badchar(*t) || badentity(t)) {
1900 if (t - c == 4) { 1900 if (t - c == 4) {