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

/^.+<\?/i.test('<?') gives true in Edge 40.15063.0.0 but false in other browsers/engines #3366

Closed
martin-honnen opened this issue Jul 16, 2017 · 4 comments

Comments

@martin-honnen
Copy link

I think in https://stackoverflow.com/questions/45122823/is-there-any-reason-why-edge-returns-true-for-xml-i-testxml-version I have found a bug with the regular expression test method in the Javascript engine of Edge 40.15063.0.0.

var xml = '<?';
var regex = /^.+<\?/i;
var test = regex.test(xml);

As there is no character at all before the < less-than sign in the input string the match ^.+ should not match anything and therefore that test call should return false and not true as it does in the cited Edge version.

@MizardX
Copy link

MizardX commented Jul 16, 2017

/^.+%x/.test('%x') displays the same bug. Tested in Edge 41.16232.1000.0

@martin-honnen
Copy link
Author

Based on the tests added in a8e157a#diff-18608f601e3f7519b31ec8d2d2e28e25 it looks as if that fix already tries to address the posted problem with /^.+.

@MikeHolman
Copy link
Contributor

You're right. I verified in our console host and your bug is fixed by #3201, which will ship as part of the next version of Edge.

@curtisman
Copy link
Contributor

Closing the issue as this is already fixed in ChakraCore v1.6 and master

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

4 participants