Bugs item #614002, was opened at 2002-09-24 14:27
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=432066&aid=614002&group_id=42081
Category: None
Group: None
>Status: Closed
>Resolution: Out of Date
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
>Assigned to: Glenn Carr (glenncarr)
Summary: Javascript errors from RegExp's
Initial Comment:
My environment is Windows XP, SP1 with IE 6.0.2800...
I installed version 3.1.3.0 and was unable to perform any
searches. I received Javascript errors when starting the
toolbar, as well as when attempting searches. While
debugging, I discovered that the errors were occurring
with some of the regular expressions that are in the
code. The problematic expressions contained '?'s as
the first character of an atom, or assertion. This was
causing IE script errors, because there was no
character preceeding the '?' to apply the quantitative
match to. Here are the changes I made in order to get
up and running:
file: defer_tools.js
line: 154
changed to:
var re_switch = /\/(([-.\w]+)(:?(\S*)))\s*/;
file: search.htm
line: 372 - 374
changed to:
var prot = new RegExp("^\s*(((http\[s?\]|ftp)://)([\-a-z0-
9]+\.)*([\-a-z0-9])+)|[a-z]:($|\\)" +
"|\\\\[\w]+[\w\$]*($|\\($|[\w\$\&]+
($|\\)))", "i");
file: search.htm
line: 382 - 383
changed to:
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|co
op|aero|pro|[a-z]{2})(/\S*)?)$", "i");
I didn't see any posts that indicated others were having
the exact same problem, so I thought I'd submit the
changes that worked for me just in case.
Thanks,
-Rob Sioss
rsioss @ yahoo dot com
----------------------------------------------------------------------
>Comment By: Glenn Carr (glenncarr)
Date: 2002-09-30 08:40
Message:
Logged In: YES
user_id=18127
Glenn,
Thanks for all your advice / help. I installed a new script
engine today and
the default installation of the toolbar works great! Strangely
enough, XP
would not let me install version 5.6 of the script engine (it
gave an error
message indicating that the product had not been logo tested
to certify its
compatibility with XP). I installed script engine 5.5 and it
appears to be all
set.
Thanks again,
-Rob Sioss
----------------------------------------------------------------------
Comment By: Glenn Carr (glenncarr)
Date: 2002-09-24 23:59
Message:
Logged In: YES
user_id=18127
Rob,
It looks like you have an old version of the scripting engine for
some strange reason. The page should show at least 5.5 as
the major.minor version (I think). E.g., mine with IE6 sp1
says this:
JScript Version 5.6.6626
I'm not sure how IE6 got installed without installing the latest
scripting engines, unless some other misbehaving software
installation installed the 5.1 over your existing 5.5/6
installation. Try installing the 5.6 scripting engine:
http://smlnk.com/?RFARH53I
----------------------------------------------------------------------
Comment By: Glenn Carr (glenncarr)
Date: 2002-09-24 15:40
Message:
Logged In: YES
user_id=18127
This confuses me because the current regex is valid. The
question mark just indicates an non-capturing match. From
the JScript regular express help:
http://smlnk.com/?PQOMCZQ4
Check the documentation for (?:pattern). The only thing I can
think is that for some reason the script engine is out-of-date.
What does the attached .htm file say when you click on it?
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody)
Date: 2002-09-24 15:11
Message:
Logged In: NO
Change to file: search.htm on lines 372 - 274 should read:
var prot = new RegExp("^\s*(((http[s]?|ftp)://)([\-a-z0-9]+\.)*
([\-a-z0-9])+)|[a-z]:($|\\)" +
"|\\\\[\w]+[\w\$]*($|\\($|[\w\$\&]+
($|\\)))", "i");
The original post was incorrect. I was thinking I needed to
escape the brackets in the RegExp string... and I also
misplaced the '?' within the http[s] match. Sorry for the
mistakes!! This corrected comment has been tested and
works for me.
Sincerely,
Rob Sioss
rsioss @ yahoo dot com
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=432066&aid=614002&group_id=42081
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
DQSD-Devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dqsd-devel