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

Regex parameters do not respect case insensitivity #1671

Closed
MohammadYounes opened this issue Jan 4, 2015 · 4 comments · Fixed by #1713
Closed

Regex parameters do not respect case insensitivity #1671

MohammadYounes opened this issue Jan 4, 2015 · 4 comments · Fixed by #1713
Labels
Milestone

Comments

@MohammadYounes
Copy link
Contributor

I tried the $urlMatcherFactoryProvider config:

app.config(function ($urlMatcherFactoryProvider) {
  $urlMatcherFactoryProvider.caseInsensitive(true);
  $urlMatcherFactoryProvider.strictMode(false);
});

http://plnkr.co/edit/zdHlfVHBpnwDD3W5iUOW?p=preview

I traced this down to this line, not sure if this is the intended behavior or it should be like this:

type = $$UMFP.type(regexp || "string") || inherit($$UMFP.type("string"), { pattern: new RegExp(regexp, config.caseInsensitive ? 'i' : undefined) });

Thanks.

@MohammadYounes
Copy link
Contributor Author

Should I send a PR?

@nateabele
Copy link
Contributor

Should I send a PR?

Yes.

Good find, thanks.

@nateabele
Copy link
Contributor

Be sure to check out and follow the contributor guidelines when submitting, thanks again.

@MohammadYounes
Copy link
Contributor Author

Already submitted #1713

Hope it conforms to the guidelines!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants