-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Safari - [Error] SyntaxError: Invalid regular expression: missing terminating ] for character class #2625
Comments
Changing the source code to below fixed the issue. var rsAposTemp = ''\u2019' |
Hi @joshikeerti! This doesn't look like a Lodash issue. Maybe more an encoding issue? |
I had a similar problem and it happened because I'm using WebPack's uglify which does the compression of unicode characters to UTF-8 and the server wasn't specifying UTF-8 as the charset causing the browser to fail to properly parse it. |
Did you forget to set charset in |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hi,
I am using lodash version 4.15 in one of my projects and the below error is thrown in safari when the application is rendered for japanese language.
'Error] SyntaxError: Invalid regular expression: missing terminating ] for character class '
The error is thrown on this line in the source code
var rsApos = "['\u2019]"
When the application is rendered in English, the source code shows Yn = "['’]"
In Japanese its Yn = "['窶兢",
There is a bracket missing when its in japanese and the error is thrown.
The text was updated successfully, but these errors were encountered: