Bug 209528 - \b escapes inside character classes should be valid in Unicode patterns
Summary: \b escapes inside character classes should be valid in Unicode patterns
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Minor
Assignee: Alexey Shvayka
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-03-24 18:00 PDT by Alexey Shvayka
Modified: 2020-03-25 04:12 PDT (History)
9 users (show)

See Also:


Attachments
Patch (3.35 KB, patch)
2020-03-24 18:20 PDT, Alexey Shvayka
no flags Details | Formatted Diff | Diff
Patch (5.81 KB, patch)
2020-03-24 19:38 PDT, Alexey Shvayka
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Shvayka 2020-03-24 18:00:30 PDT
Test case:
  /[\b]/u.test("\u0008")

Expected:
  true

Actual:
  SyntaxError thrown

ECMA262:
  According to ClassEscape grammar (https://tc39.es/ecma262/#prod-ClassEscape), "b" comes before
  CharacterEscape :: IdentityEscape. Also, see the note in https://tc39.es/ecma262/#sec-classescape.

Test262:
  JSTests/test262/test/built-ins/RegExp/unicode_character_class_backspace_escape.js
Comment 1 Alexey Shvayka 2020-03-24 18:20:33 PDT
Created attachment 394453 [details]
Patch
Comment 2 Alexey Shvayka 2020-03-24 18:57:13 PDT
Comment on attachment 394453 [details]
Patch

Thank you for review, Darin.
I will fix LayoutTests/js/regexp-unicode.html before landing this.
Comment 3 Alexey Shvayka 2020-03-24 19:38:05 PDT
Created attachment 394461 [details]
Patch

Set reviewer and adjust regexp-unicode.html test.
Comment 4 EWS 2020-03-25 04:11:54 PDT
Committed r258976: <https://trac.webkit.org/changeset/258976>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 394461 [details].
Comment 5 Radar WebKit Bug Importer 2020-03-25 04:12:15 PDT
<rdar://problem/60867395>