The default bug view has changed. See this FAQ.

Match updated spec for `/\w/iu` and `/\W/iu`

RESOLVED FIXED in Firefox 50

Status

()

Core
JavaScript Engine
RESOLVED FIXED
9 months ago
9 months ago

People

(Reporter: Mathias Bynens, Assigned: arai)

Tracking

({dev-doc-complete})

unspecified
mozilla50
dev-doc-complete
Points:
---

Firefox Tracking Flags

(firefox50 fixed)

Details

Attachments

(1 attachment)

(Reporter)

Description

9 months ago
Now that https://github.com/tc39/ecma262/pull/525 has landed, `\u017F` (LATIN SMALL LETTER LONG S) and `\u212A` (KELVIN SIGN) are word characters for `/iu` patterns.

Expected behavior:

    /\w/iu.test('\u017F') // true
    /\w/iu.test('\u212A') // true
    /\W/iu.test('\u017F') // false
    /\W/iu.test('\u212A') // false

Actual behavior: currently, they all result in `true`.
(Reporter)

Updated

9 months ago
(Reporter)

Updated

9 months ago
(Reporter)

Updated

9 months ago
(Reporter)

Updated

9 months ago
Created attachment 8764761 [details] [diff] [review]
Do not match K, S, k, s, KELVIN SIGN, LATIN SMALL LETTER LONG S with \W in unicode RegExp.

Removed K, S, k, s, KELVIN SIGN, LATIN SMALL LETTER LONG S from kNegatedIgnoreCaseWordAndSurrogateRanges.
Assignee: nobody → arai.unmht
Attachment #8764761 - Flags: review?(till)
Comment on attachment 8764761 [details] [diff] [review]
Do not match K, S, k, s, KELVIN SIGN, LATIN SMALL LETTER LONG S with \W in unicode RegExp.

Review of attachment 8764761 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good, thank you.
Attachment #8764761 - Flags: review?(till) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/71d499e82b2cd5096b6f92f0c565cb6cfd5c6039
Bug 1281739 - Do not match K, S, k, s, KELVIN SIGN, LATIN SMALL LETTER LONG S with \W in unicode ignoreCase RegExp. r=till
This is a breaking change.
will update documentation after merge.
Keywords: dev-doc-needed

Comment 5

9 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/71d499e82b2c
Status: NEW → RESOLVED
Last Resolved: 9 months ago
status-firefox50: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
I'm not going to write a site compatibility doc for this because the u flag is still new and the change is minor.
https://developer.mozilla.org/en-US/Firefox/Releases/50
Keywords: dev-doc-needed → dev-doc-complete
You need to log in before you can comment on or make changes to this bug.