Skip to content
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

RegExp is crashing the process #349

Closed
dciccale opened this issue Apr 4, 2015 · 1 comment
Closed

RegExp is crashing the process #349

dciccale opened this issue Apr 4, 2015 · 1 comment

Comments

@dciccale
Copy link

dciccale commented Apr 4, 2015

try the following line of code in the browser or node through terminal (is going to hang the process)
is not crashing firefox though..

'<input type="email" name="email" class="form-control" ng-model="user.email" required'.match(/^<([\w:-]+)((?:\s*[\w:.-]+(?:\s*(?:(?:=))\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/)

is not actually crashing the process but takes a veeery long time to return and adding more attributes to the html is even worst. Related to #213

this regexp is returned by startTagForHandler and the string is actually part of the html that is going through the parser.

apparently for what I googled, is a bug in the js engine http://stackoverflow.com/questions/12825950/why-does-this-javascript-match-function-crash-my-browser

@kangax
Copy link
Owner

kangax commented Jul 3, 2015

Duplicate of #332

@kangax kangax closed this as completed Jul 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants