Closed
Bug 101070
Opened 24 years ago
Closed 23 years ago
microsoft.com - Using "/" character unescaped in RegExp literals is non-ECMA
Categories
(Tech Evangelism Graveyard :: English US, defect, P1)
Tracking
(Not tracked)
RESOLVED
FIXED
Jan
People
(Reporter: pschwartau, Assigned: bc)
References
()
Details
This was discovered in:
bug 98306
bug 99377
bug 99667
At the webpages given in these bugs, all at http://msdn.microsoft.com/,
syntax like this is used:
this.userAgent.match(/Mozilla[/].*(95[/]NT|95|NT|98|3.1).*Opera.*(\d+)\.(\d+)/)
Notice the use of the character "/" in the RegExp literal. According
to the ECMA-262 Final spec, the character "/" must be ESCAPED by "\"
if used inside a RegExp literal. It can only be unescaped if passed to
the RegExp() function or constructor. See bug 98306 for documentation.
This incorrect syntax causes Mozilla to report a JS syntax error
every time such code is encountered at http://msdn.microsoft.com
![]() |
Reporter | |
Comment 1•24 years ago
|
||
Raising severity to major because of the importance of this site.
Note the fix is easy to implement -
Severity: normal → major
Assignee | ||
Updated•24 years ago
|
Priority: -- → P1
Summary: Using "/" character unescaped in RegExp literals is non-ECMA → microsoft.com - Using "/" character unescaped in RegExp literals is non-ECMA
![]() |
||
Comment 2•24 years ago
|
||
I can't reproduce this. Some of the MSDN pages load fine for me, while some
don't show up at all. What is the exact URL of the MSDN web page script that
contains the [/]'s, and what page directly calls that script?
![]() |
||
Comment 3•24 years ago
|
||
The URL for the JS that contains the [/] subpattern is
http://msdn.microsoft.com/workshop/code/browdata.js
It is included in many (most?) pages on that site, for example, the frameset:
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/refere
nce/dhtmlrefs.asp
in a child frame of that frameset:
http://msdn.microsoft.com/workshop/author/dhtml/reference/dhtmlrefs.asp?frame=t
rue
(Although, frankly, this bug seems somewhat quixotic to me :-]
Assignee | ||
Updated•24 years ago
|
Whiteboard: [aok]
Comment 5•23 years ago
|
||
I am not getting errors although the code doesn't seem to have changed.
Assignee | ||
Comment 6•23 years ago
|
||
did not see the error in:
http://msdn.microsoft.com/library/toolbar/toolbar.js
http://msdn.microsoft.com/library/toolbar/en-us/global.js
http://msdn.microsoft.com/library/include/ctredir.js
-> fixed.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Updated•10 years ago
|
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•