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

Link URL With Spaces Does Not Render #1639

Closed
rkever-d-zz opened this issue Apr 9, 2020 · 3 comments · Fixed by #1851
Closed

Link URL With Spaces Does Not Render #1639

rkever-d-zz opened this issue Apr 9, 2020 · 3 comments · Fixed by #1851
Labels
category: links L2 - annoying Similar to L1 - broken but there is a known workaround available for the issue released

Comments

@rkever-d-zz
Copy link

rkever-d-zz commented Apr 9, 2020

When a link with spaces in the URL it does render the element as a link.

Examples

  • [My Link](http://somesite.com/my path)
  • [My Link](http://somesite.com/my file name.pdf)

When I'm adding the markdown syntax I am now making sure I encode that href url before it gets rendered by marked.

@rkever-d-zz rkever-d-zz changed the title Link URL Filename Spaces Link URL With Spaces Does Not Render Apr 9, 2020
@UziTech
Copy link
Member

UziTech commented Apr 10, 2020

According to the CommonMark spec:

The destination can only contain spaces if it is enclosed in pointy brackets

So you would need to use [My Link](<http://somesite.com/my path>) or convert spaces to %20 as [My Link](http://somesite.com/my%20path)

@UziTech
Copy link
Member

UziTech commented Apr 10, 2020

It looks like marked doesn't treat pointy brackets correctly in links though so only the percent encoding will work currently.

demo

@github-actions
Copy link

🎉 This issue has been resolved in version 1.2.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: links L2 - annoying Similar to L1 - broken but there is a known workaround available for the issue released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants