-
Notifications
You must be signed in to change notification settings - Fork 123
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
Emails are wrongly validated as links #1820
Comments
I think excluding it altogether would be gd(don't think there's any utility in validating an email address like that) |
The email address, as it is a link, is contained as the Currently we only have a select conditions that we use to "stop" the conversion, like if it's an URL, a hash, etc. Would be nice if we add a condition to filter out emails too as described. |
Would also be good to account for phone numbers as well. <a href="tel:91234567">mobile no.</a> |
Nope! Issue persists as #1819 moves the validation to the end of compiling all pages, but doesn't change the validation itself ( |
Tell us about your environment
MacOS Monterey 12.0.1
What did you do? Please include the actual source code causing the issue.
Place emails in any markdown file, e.g.:
What did you expect to happen?
The emails should not be logged as warnings for invalid intralinks.
What actually happened? Please include the actual, raw output.
![Screenshot 2022-03-11 at 8 25 33 PM](https://user-images.githubusercontent.com/61113575/157868105-41cdaa22-feb3-4bd5-9df3-a65ee6d4b467.png)
The email is prepended with a filepath (e.g.
userGuide/mailto:
), which is confusing since this prefix does not appear in the source files at all, and doing a search onuserGuide/mailto:email@gmail.com
will not give any results for an author trying to find where the invalid link is.This is because
convertRelativeLinks
is called on all links, including emails, so a filepath is prepended onto emails.I think a possible fix would be to check for emails (conveniently, they can be identified by a
mailto:
prefix) and not convert them to relative links, and possibly exclude them fromvalidateIntralink
calls.The text was updated successfully, but these errors were encountered: