View the DQSD CVS repository here:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/dqsd/
Update of /cvsroot/dqsd/dqsd
In directory usw-pr-cvs1:/tmp/cvs-serv12325
Modified Files:
ChangeLog.txt search.htm
Log Message:
Open URLs that resemble FTP servers with the "ftp:" protocol instead of "http:" [Fix
for feature request #598368]
Index: ChangeLog.txt
===================================================================
RCS file: /cvsroot/dqsd/dqsd/ChangeLog.txt,v
retrieving revision 1.77
retrieving revision 1.78
diff -C2 -d -r1.77 -r1.78
*** ChangeLog.txt 18 Aug 2002 11:55:15 -0000 1.77
--- ChangeLog.txt 21 Aug 2002 19:33:19 -0000 1.78
***************
*** 15,18 ****
--- 15,21 ----
Enhancements
+ * Names that resemble FTP servers (i.e., start with "ftp.") are opened
+ with the ftp: protocol. (Feature request #598368)
+
Bug Fixes
Index: search.htm
===================================================================
RCS file: /cvsroot/dqsd/dqsd/search.htm,v
retrieving revision 1.157
retrieving revision 1.158
diff -C2 -d -r1.157 -r1.158
*** search.htm 30 Jul 2002 19:35:09 -0000 1.157
--- search.htm 21 Aug 2002 19:33:19 -0000 1.158
***************
*** 368,374 ****
{
// detect strings that look like URLs or filenames
! prot = new RegExp("^\\s*((http://|https://|ftp://)([\\-a-z0-9]+\\.)*[\\-a-z0-9]+" +
! "|[a-z]:($|\\\\)" +
! "|\\\\\\\\[\\w]+[\\w\$]*($|\\\\($|[\\w\$\&]+($|\\\\))))", "i");
if (prot.exec(t))
{
--- 368,374 ----
{
// detect strings that look like URLs or filenames
! var prot = new
RegExp("^\\s*((http://|https://|ftp://)([\\-a-z0-9]+\\.)*[\\-a-z0-9]+" +
! "|[a-z]:($|\\\\)" +
! "|\\\\\\\\[\\w]+[\\w\$]*($|\\\\($|[\\w\$\&]+($|\\\\))))",
"i");
if (prot.exec(t))
{
***************
*** 378,387 ****
// detect strings that look like DNS names
! dns = new RegExp("^\\s*(www\.([\\-a-z0-9]+\\.)+[\\-a-z0-9]+(/\\S*)?" +
!
"|([\\-a-z0-9]+\\.)+(com|net|org|edu|gov|mil|int|arpa|info|biz|name|museum|coop|aero|pro|[a-z]{2})(/\\S*)?)$",
"i");
! if (dns.exec(t))
{
! openSearchWindow("http://" + t.replace( /^\s(.*)/, "$1") );
return true;
}
--- 378,388 ----
// detect strings that look like DNS names
! var re = new
RegExp("^\\s*(?:(www|ftp)\.(?:[\\-a-z0-9]+\\.)+[\\-a-z0-9]+(?:/\\S*)?" +
!
"|(?:[\\-a-z0-9]+\\.)+(?:com|net|org|edu|gov|mil|int|arpa|info|biz|name|museum|coop|aero|pro|[a-z]{2})(?:/\\S*)?)$",
"i");
! var res = t.match(re);
! if (res)
{
! openSearchWindow( (("ftp" == res[1].toLowerCase()) ? "ftp://" : "http://") +
t.replace( /^\s(.*)/, "$1") );
return true;
}
-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone? Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
DQSD-CVS mailing list
https://lists.sourceforge.net/lists/listinfo/dqsd-cvs
DQSD CVS repository:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/dqsd/