New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Forbidden extension in RegExp pattern grammar #4368
Comments
dilijev
added a commit
to dilijev/ChakraCore
that referenced
this issue
Feb 6, 2018
See chakra-core#4637: Fix chakra-core#4368: In unicode-mode RegExp, explicitly disallow invalid escapes. Fixes OS#15775563
dilijev
added a commit
to dilijev/ChakraCore
that referenced
this issue
Feb 6, 2018
See chakra-core#4637: Fix chakra-core#4368: In unicode-mode RegExp, explicitly disallow invalid escapes. Fixes OS#15775563
chakrabot
pushed a commit
that referenced
this issue
Feb 6, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See https://tc39.github.io/ecma262/#sec-forbidden-extensions (and https://bugs.ecmascript.org/show_bug.cgi?id=3157 for more background):
Chakra incorrectly extends the grammar in this way, which is especially problematic for
\p
and\P
:This presents a compatibility risk. One might reasonably assume that if the above RegExp compiles without throwing an exception, the engine supports Unicode property escapes, and then rely on the results that it produces. With the current behavior, that would result in incorrect results.
Any of the following should throw an exception:
And this should throw an exception until Unicode property escapes are implemented:
The text was updated successfully, but these errors were encountered: