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

"mailto" links, possibly with optional Subject, not rendering correctly #1030

Closed
kenlunde opened this issue Mar 22, 2017 · 7 comments
Closed

Comments

@kenlunde
Copy link

In Source Han Sans and other projects in our organization, the use of mailto is not working, perhaps when an optional Subject is specified.

The following is specified: [Dr. Ken Lunde](mailto:lunde@adobe.com?subject=[GitHub] Source Han Sans)

This is expected to be rendered as only Dr. Ken Lunde, but when clicked, will initiate an email in the default email client with "[GitHub] Source Han Sans" specified as the default Subject.

Instead, I see the literal markdown, per the screenshot below:

github-markdown-issue

This happens regardless of the Browser: Chrome, Firefox, and Safari running on macOS Version 10.12.3.

@shawnajean
Copy link
Member

shawnajean commented Mar 22, 2017

Hey there! 👋 This actually has to do with URL requirements per the CommonMark spec. CommonMark does not allow for spaces in URLs, so you need to encode those as %20 in order for this to be a valid URL:

[Dr. Ken Lunde](mailto:lunde@adobe.com?subject=[GitHub]%20Source%20Han%20Sans)

Dr. Ken Lunde

You can review CommonMark's definition of a URL (link destination) here:

https://github.github.com/gfm/#link-destination

@kenlunde
Copy link
Author

Thank you!

tsekityam added a commit to tsekityam/CppCoreGuidelines that referenced this issue Apr 21, 2017
Spaces are not allowed in the URL, so the link is broken. Spaces in the URL should be encoded as `%20` to make the link be rendered correctly.
See also: github/markup#1030
samli88 added a commit to samli88/multiformats that referenced this issue Dec 9, 2018
Per discussion on [this issue](github/markup#1030),
mailto links with subjects must have spaces URL-encoded.
@alexdeborba
Copy link

Thank you for posting this.

I was here battling to figure out how to add support e-mail to the README.md

dccote added a commit to DCC-Lab/RayTracing that referenced this issue Jun 28, 2020
FIxed spacing issue that prevented mailto link from appearing correctly.
Found solution here: github/markup#1030
@emersonpessoa01
Copy link

emersonpessoa01 commented Oct 4, 2020

Thank you!! because of your explanation. Helped me make this link:

general code:
<a href="mailto:emersonpess011108@gmail.com?"><img src="https://img.shields.io/badge/gmail-%23DD0031.svg?&style=for-the-badge&logo=gmail&logoColor=white"/></a>

@moroz69off
Copy link

moroz69off commented Apr 10, 2021

Thank you!

shawnajean, you best in hub!

It's a shame that I didn't guess myself, because in web addresses we always write% 20

I would recommend the extension to other friends - VS-extension (If you are using Visual Studio)

And THIS EDITHOR (A little harder to customize for yourself, but a VERY POWERFUL md-editor)

@emersonpessoa01
Copy link

emersonpessoa01 commented Apr 10, 2021 via email

@KrishGaur1354
Copy link

Thanks! Was looking for a way to add my E-mail Address Link to my Readme.md

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

6 participants