You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
allanhortle
changed the title
Certain links with @ symbols and periods breaks simplifiedAutoLink
Certain links with @ symbols and periods break simplifiedAutoLink
Oct 6, 2015
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/[email protected]
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/[email protected] but not website.com/[email protected], since it's impossible to know if it's an email or a link
Example: http://showdownjs.github.io/demo/#/http%3A%2F%2Fwebsite.com%2Fimg%40x2.jpg%0A%0Ahttp%3A%2F%2Fwebsite.com%2Fimg-x2.jpg%0A%0Ahttp%3A%2F%2Fwebsite.com%2Fimg%40x2%0A%0Ahttp%3A%2F%2Fwebsite.com%2Fimg%40.jpg
The text was updated successfully, but these errors were encountered: