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

Email addresses are returned #51

Open
richrout opened this issue Feb 22, 2018 · 3 comments · May be fixed by #63
Open

Email addresses are returned #51

richrout opened this issue Feb 22, 2018 · 3 comments · May be fixed by #63

Comments

@richrout
Copy link

Hey there!

We're using this library to pull urls out of a user input string. We're currently running into a problem where it returns email addresses.

'This is an [email protected]'.match(urlRegex({ exact: false, strict: false }));
// returns ['[email protected]']

I think it should return no matches in this case.

@sseppola
Copy link

sseppola commented Jul 9, 2019

I came across this as well in a different scenario.

The issue seems to stem from the auth part of the basic authentication scheme, which has been removed from Chrome.

Would you be interested in a PR that creates an opt-out from basic authentication?

@richrout
Copy link
Author

richrout commented Jul 9, 2019

I think that would make sense. Basic auth urls seem pretty obsolete now-a-days.

@niftylettuce
Copy link
Collaborator

This issue is fixed in my maintained and modern version of this package at https://github.com/niftylettuce/url-regex-safe. You should be able to switch from url-regex to url-regex-safe now. See the updated list of options as I added some new ones, and changed a few defaults to more sensible ones (since not everyone is parsing Markdown for instance).

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

Successfully merging a pull request may close this issue.

3 participants