microsoft.com - JS throwing an error on unescaped "/" character in RegExp literals

RESOLVED DUPLICATE of bug 309840

Status

RESOLVED DUPLICATE of bug 309840
15 years ago
4 years ago

People

(Reporter: wolruf, Unassigned)

Tracking

({top100, top500})

Details

(Whiteboard: [ Reopen bug 101070 on the same site? ], URL)

(Reporter)

Description

15 years ago
Build ID: 20031105

Not sure if this is a regression, I'll test an earlier build, pre-patch for bug
223273.

On URL:
http://msdn.microsoft.com/workshop/author/dhtml/overview/ccomment_ovw.asp

JavaScript console shows:
Error: unterminated character class 
Source File: http://msdn.microsoft.com/workshop/code/browdata.js
Line: 26, Column: 31
Source Code:
	else if
(this.userAgent.match(/Mozilla[/].*(95[/]NT|95|NT|98|3.1).*Opera.*(\d+)\.(\d+)/))

As this is new to me (I hadn't noticed this before on msdn) and look related to
bug 223273, this could be a regression.

I reduced it to:

js> /foo[/].(\d+)/
Error: unterminated character class 

Not being a JS expert, I'm not sure if it's mozilla's fault, I'll check with an
earlier build asap.

Comment 1

15 years ago
JS is doing the right thing in throwing this error. See bug 173067:
'Using "/" character unescaped in RegExp literals causes an error'

Also see bug 98306 comment 31, and following comments.

Bug 173067 is ready to be marked Invalid, but has been held open
due to discrepancies we noticed in our error text.

We filed an Evangelism bug on Microsoft for this issue: bug 101070,
'microsoft.com - Using "/" character unescaped in RegExp literals is non-ECMA'

That bug was marked fixed, because it seemed like MS had fixed things.
But it looks like they haven't gotten all instances of this. 

Olivier: thank you for this report. I'm going to reassign this to 
Tech Evangelism for disposition. It is either a dupe of bug 101070,
which would then have to be reopened, or it could stand alone -
Assignee: general → english-us
Component: JavaScript Engine → English US
Product: Browser → Tech Evangelism
QA Contact: PhilSchwartau → english-us
Summary: JS RegExp throwing an error → JS throwing an error on unescaped "/" character in RegExp literals
Whiteboard: [ Reopen bug 101070 on the same site? ]
Version: Trunk → unspecified

Updated

14 years ago
Keywords: top500

Comment 2

14 years ago
Conforming summary to TFM item 10 at 
http://www.mozilla.org/projects/tech-evangelism/site/procedures.html#file-new
Summary: JS throwing an error on unescaped "/" character in RegExp literals → microsoft.com - JS throwing an error on unescaped "/" character in RegExp literals

Updated

14 years ago
Keywords: top100

Comment 3

13 years ago
Fixed in Firefox, see bug 309840.
(Reporter)

Comment 4

13 years ago

*** This bug has been marked as a duplicate of 309840 ***
Status: NEW → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → DUPLICATE
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in before you can comment on or make changes to this bug.