Minified Script: Invalid regular expression
See original GitHub issueI’m submitting a…
[ ] Regression (a behavior that used to work and stopped working in a new release)
[X] Bug report
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:
Browser:
- Chrome version 74
- Firefox version XX
- IE version XX
- Edge version XX
- Safari version XX
Library version
Library version: 1.0.1
## Current behavior
As soon as the script is loaded it throws the regex error and "Msal is not defined". Seems to work fine in a local environment, but fails on Azure app service.
## Expected behavior
Successfully load...
## Minimal reproduction of the problem with instructions
There was no problem when run locally, but it won't load when deployed to an Azure app service.
I think it’s related to here:
var re_btou = new RegExp([
'[\xC0-\xDF][\x80-\xBF]',
'[\xE0-\xEF][\x80-\xBF]{2}',
'[\xF0-\xF7][\x80-\xBF]{3}'
].join('|'), 'g');
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
SyntaxError: invalid regular expression flag "x" - MDN Web Docs
The JavaScript exception "invalid regular expression flag" occurs when the flags in a regular expression contain any flag that is not one of:...
Read more >JavaScript minification fails containing certain Regex
JavaScript regex engine always allows an unescaped / in a RegExp constructor notation and you may use an unescaped / forward slash inside ......
Read more >When minify is used js error message occur - WordPress.org
Hi! I get Uncaught SyntaxError: Invalid regular expression: missing / when i use Litespeed cache plugins minify functionality. When i turn of minify...
Read more >JavaScript SyntaxError - Invalid regular expression flag "x"
This JavaScript exception invalid regular expression flag occurs if the flags, written after the second slash in RegExp literal, are not from ...
Read more >How to react to invalid search regex? — DataTables forums
dataTables.js:4476 Uncaught SyntaxError: Invalid regular expression: /(/: Unterminated group at new RegExp (<anonymous>) at ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Here’s my results running locally with my Chrome extension.
I’m not an expert, but shouldn’t the minimization not change the code @hunterwebapps mentioned to this? Looks almost like an encoding conversion issue.
re_btou=new RegExp(["[À-ß][€-¿]","[à -ï][€-¿]{2}","[ð-÷][€-¿]{3}"]
great closing issue, thanks for feedback