[Webkit-unassigned] [Bug 207023] New: Unmatched ] or } brackets should be syntax errors in Unicode patterns only

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 30 17:18:28 PST 2020


https://bugs.webkit.org/show_bug.cgi?id=207023

            Bug ID: 207023
           Summary: Unmatched ] or } brackets should be syntax errors in
                    Unicode patterns only
           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

Test case:
  /]/u

Expected:
  SyntaxError thrown

Actual:
  RegExp instance

ECMA262:
  https://tc39.es/ecma262/#prod-annexB-Term (/u flag precludes the use of ExtendedPatternCharacter)

  Term[U, N] ::
    [~U] ExtendedAtom[?N]

  ExtendedAtom[N] ::
    ExtendedPatternCharacter

  ExtendedPatternCharacter ::
    SourceCharacter but not one of ^ $ \ . * + ? ( ) [ |

Test262:
  https://test262.report/browse/built-ins/RegExp/unicode_restricted_brackets.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/20200131/4e5b98b7/attachment.htm>


More information about the webkit-unassigned mailing list