-
Notifications
You must be signed in to change notification settings - Fork 11
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
Invalid character escape returns error in regress but is accepted in other JS engines #26
Comments
Apologies for the delay. regress assumes the JS Unicode flag 'u' is set, which does not allow this escape:
How would you like to proceed? If we need to tweak the syntax, or add a new flag I can do that. |
Probably we should disable the Unicode support unless the |
There's no support for non-Unicode in regress today. Non-Unicode regexes per the JS spec have a lot of terrible semantics: only supports BMP, its case folding is crazy. But probably regress can have a mode that supports the non-Unicode syntax (including this escape) but still supports the Unicode semantics. I can work on adding that. |
Sounds good @ridiculousfish 👍 |
In Boa we had an issue of
causing a panic, due to regress triggering a "Invalid character escape" panic.
However this seems to be acceptable in other JS engines, running the above in chrome for example is allowed.
Is there somewhere in the specification that does not allow invalid escapes?
Linked to Boa PR: boa-dev/boa#1027
The text was updated successfully, but these errors were encountered: