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

Certain links with @ symbols and periods break simplifiedAutoLink #204

Closed
allanhortle opened this issue Oct 6, 2015 · 2 comments
Closed
Assignees
Labels

Comments

@allanhortle allanhortle changed the title Certain links with @ symbols and periods breaks simplifiedAutoLink Certain links with @ symbols and periods break simplifiedAutoLink Oct 6, 2015
@tivie tivie self-assigned this Oct 7, 2015
@tivie tivie added the bug label Oct 7, 2015
@tivie
Copy link
Member

tivie commented Oct 7, 2015

Thanks @allanhortle.

The problem here is the logic used to detect email addresses.

According to rfc6531, in the local part of the email (the part that comes before the @ symbol) the following characters are allowed:

  • Uppercase and lowercase English letters (a-z, A-Z)
  • Digits 0 to 9
  • Characters ! # $ % & ' * + - / = ? ^ _ ` { | } ~
  • Character . (dot, period, full stop) provided that it is not the first or last character, and provided also that it does not appear two or more times consecutively.

This means something like this is a valid email website.com/img@x2.jpg

Right now, we basically allowed every character in the email's local part. A possible fix is to be explicit email parsing regex.

This will fix http://website.com/img@x2.jpg but not website.com/img@x2.jpg, since it's impossible to know if it's an email or a link

@tivie tivie closed this as completed in 8ebb25e Oct 7, 2015
@tivie
Copy link
Member

tivie commented Oct 7, 2015

should be fixed now

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

No branches or pull requests

2 participants