[Webkit-unassigned] [Bug 206768] New: Invalid ranges in character classes should be banned in unicode patterns
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jan 24 13:41:24 PST 2020
https://bugs.webkit.org/show_bug.cgi?id=206768
Bug ID: 206768
Summary: Invalid ranges in character classes should be banned
in unicode patterns
Product: WebKit
Version: WebKit Nightly Build
Hardware: All
OS: All
Status: NEW
Severity: Trivial
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: shvaikalesh at gmail.com
In ES5, grammar of CharacterRange was ambiguous, resulting in invalid ranges like /[\d-a]/ being allowed.
As of ES2015, invalid ranges are SyntaxError in unicode patterns, yet still allowed in regular ones to avoid breaking the web.
Test case:
/[a-\d]/u
Expected:
SyntaxError thrown
Actual:
RegExp instance
ECMA262: https://tc39.es/ecma262/#sec-patterns-static-semantics-early-errors-annexb
Test262:
https://test262.report/browse/built-ins/RegExp/unicode_restricted_character_class_escape.js
test/built-ins/RegExp/property-escapes/character-class-range*.js
test/language/literals/regexp/u-invalid-non-empty-class-ranges*.js
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200124/1d8d54b6/attachment-0001.htm>
More information about the webkit-unassigned
mailing list