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

URLs with commas are partial #15

Open
jromero opened this issue Oct 15, 2014 · 0 comments
Open

URLs with commas are partial #15

jromero opened this issue Oct 15, 2014 · 0 comments

Comments

@jromero
Copy link

jromero commented Oct 15, 2014

Based on RFC commas are allowed characters yet the following link get's partially detected up to the comma.
http://maps.googleapis.com/maps/api/geocode/json?latlng=40.714224,-73.961452&sensor=false

Looking at the regex /(^|["'(\s]|<)((?:(?:https?|ftp):\/\/|mailto:).+?)((?:[:?]|\.+)?(?:\s|$)|>|[)"',])/g, it appears that it's trying to be "smart" about ending the link based on surrounding content such as visit us at http://example.com/?contact_us, we're always there but it's breaking functionality and the comma detection should be removed to make the regex /(^|["'(\s]|<)((?:(?:https?|ftp):\/\/|mailto:).+?)((?:[:?]|\.+)?(?:\s|$)|>|[)"'])/g

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

1 participant