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-serv15688
Modified Files:
ChangeLog.txt search.htm
Log Message:
Changed regex so that URLs, filenames, etc. are now detected with leading whitespace
Index: ChangeLog.txt
===================================================================
RCS file: /cvsroot/dqsd/dqsd/ChangeLog.txt,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** ChangeLog.txt 22 Jul 2002 13:28:55 -0000 1.39
--- ChangeLog.txt 22 Jul 2002 16:44:11 -0000 1.40
***************
*** 24,28 ****
Bug Fixes
! *
--- 24,28 ----
Bug Fixes
! * URLs, filenames, etc. are now detected with leading whitespace
Index: search.htm
===================================================================
RCS file: /cvsroot/dqsd/dqsd/search.htm,v
retrieving revision 1.150
retrieving revision 1.151
diff -C2 -d -r1.150 -r1.151
*** search.htm 22 Jul 2002 13:28:55 -0000 1.150
--- search.htm 22 Jul 2002 16:44:11 -0000 1.151
***************
*** 359,365 ****
{
// detect strings that look like URLs or filenames
! prot = new RegExp("^(http://|https://|ftp://)([\\-a-z0-9]+\\.)*[\\-a-z0-9]+" +
! "|^[a-z]:($|\\\\)" +
! "|^\\\\\\\\[\\w]+[\\w\$]*($|\\\\($|[\\w\$]+($|\\\\)))", "i");
if (prot.exec(t))
{
--- 359,365 ----
{
// 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))
{
***************
*** 369,378 ****
// detect strings that look like DNS names
! dns = new RegExp("^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);
return true;
}
--- 369,378 ----
// 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;
}
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
DQSD-CVS mailing list
https://lists.sourceforge.net/lists/listinfo/dqsd-cvs
DQSD CVS repository:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/dqsd/