# Problems with Markdown rendering: Links that contains apostrophes

**URL:** https://meta.discourse.org/t/problems-with-markdown-rendering-links-that-contains-apostrophes/60714
**Category:** Bug
**Tags:** markdown-it-review
**Created:** [2017年四月10日 12:17 UTC](https://meta.discourse.org/t/problems-with-markdown-rendering-links-that-contains-apostrophes/60714 "2017-04-10T12:17:54Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![rriemann](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rriemann/32/115238_2.png) [@rriemann](https://meta.discourse.org/u/rriemann)
#### Post date: [2017年四月10日 12:17 UTC](https://meta.discourse.org/t/problems-with-markdown-rendering-links-that-contains-apostrophes/60714/1 "2017-04-10T12:17:54Z")

</div>

I want to add this link here: [https://www.google.de/maps/place/Laureline’s+Corner/@45.7691847,4.8353492,19z/data=!4m5!3m4!1s0x0:0xcc75bbd0365fd4c4!8m2!3d45.7693561!4d4.835522](https://www.google.de/maps/place/Laureline's+Corner/@45.7691847,4.8353492,19z/data=!4m5!3m4!1s0x0:0xcc75bbd0365fd4c4!8m2!3d45.7693561!4d4.835522)

As you can there, there is an Apostrophe in the URL `-> ' <- `

When I now use the `[linktext](link url)` syntax, e.g. using Ctrl+K to acess the dialog, I get this here:

[Map](https://www.google.de/maps/place/Laureline's+Corner/@45.7691847,4.8353492,19z/data=!4m5!3m4!1s0x0:0xcc75bbd0365fd4c4!8m2!3d45.7693561!4d4.835522)

So far, it works.

Now, I want to add This link within parenthesis: `([linktext](link url))`.

Then, it does not work anymore:

([Map](https://www.google.de/maps/place/Laureline's+Corner/@45.7691847,4.8353492,19z/data=!4m5!3m4!1s0x0:0xcc75bbd0365fd4c4!8m2!3d45.7693561!4d4.835522))

As you can see, the closing parenthesis is not shown.

You can fix this problem by removing the apostrophe, but then the link is a different one.

---

<div class="post-metadata">

### Author: ![frostydog](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/frostydog/32/68228_2.png) [@frostydog](https://meta.discourse.org/u/frostydog)
#### Post date: [2017年四月10日 12:22 UTC](https://meta.discourse.org/t/problems-with-markdown-rendering-links-that-contains-apostrophes/60714/2 "2017-04-10T12:22:58Z")

</div>

This is a Markdown problem, in general. My suggestion is to do the following:

`[linktext][1]`

`[1]: https://www.google.de/maps/place/Laureline's+Corner/@45.7691847,4.8353492,19z/data=!4m5!3m4!1s0x0:0xcc75bbd0365fd4c4!8m2!3d45.7693561!4d4.835522`

Can also be applied to links with parenthesis.

---

<div class="post-metadata">

### Author: ![rriemann](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rriemann/32/115238_2.png) [@rriemann](https://meta.discourse.org/u/rriemann)
#### Post date: [2017年四月10日 12:38 UTC](https://meta.discourse.org/t/problems-with-markdown-rendering-links-that-contains-apostrophes/60714/3 "2017-04-10T12:38:02Z")

</div>

Where is the upstream markdown bug tracker? It is still an unattended behaviour and should be fixed somewhere in my humble opinion.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [2017年四月10日 12:58 UTC](https://meta.discourse.org/t/problems-with-markdown-rendering-links-that-contains-apostrophes/60714/4 "2017-04-10T12:58:13Z")

</div>

Shouldn’t the apostrophe be URL encoded?

---

<div class="post-metadata">

### Author: ![rriemann](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rriemann/32/115238_2.png) [@rriemann](https://meta.discourse.org/u/rriemann)
#### Post date: [2017年四月10日 13:09 UTC](https://meta.discourse.org/t/problems-with-markdown-rendering-links-that-contains-apostrophes/60714/5 "2017-04-10T13:09:33Z")

</div>

This is a good question. I clicked on _Share_ on Google Maps and copy’n’pasted  
the link including the apostrophe.

---

<div class="post-metadata">

### Author: ![mcwumbly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcwumbly/32/103861_2.png) [@mcwumbly](https://meta.discourse.org/u/mcwumbly)
#### Post date: [2017年四月10日 13:17 UTC](https://meta.discourse.org/t/problems-with-markdown-rendering-links-that-contains-apostrophes/60714/6 "2017-04-10T13:17:34Z")

</div>

> [@rriemann](#):
>
> Where is the upstream markdown bug tracker? It is still an unattended behaviour and should be fixed somewhere in my humble opinion

Eventually Discourse will use some implementation of CommonMark.

Try it here:

> **[commonmark.js demo](https://spec.commonmark.org/dingus/)**

And discuss here:

> **[CommonMark Discussion](https://talk.commonmark.org)**
>
> Discussion about CommonMark - A strongly defined, highly compatible specification of Markdown

---

<div class="post-metadata">

### Author: ![rriemann](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rriemann/32/115238_2.png) [@rriemann](https://meta.discourse.org/u/rriemann)
#### Post date: [2017年四月11日 09:19 UTC](https://meta.discourse.org/t/problems-with-markdown-rendering-links-that-contains-apostrophes/60714/7 "2017-04-11T09:19:11Z")

</div>

I could **not** reproduce this problem with commonmark Dingus.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2017年六月26日 13:29 UTC](https://meta.discourse.org/t/problems-with-markdown-rendering-links-that-contains-apostrophes/60714/8 "2017-06-26T13:29:53Z")

</div>

Fixed now with our new CommonMark engine, see: [CommonMark testing started here! - #2](https://meta.discourse.org/t/commonmark-testing-started-here/65121/2)

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2017年六月26日 13:30 UTC](https://meta.discourse.org/t/problems-with-markdown-rendering-links-that-contains-apostrophes/60714/9 "2017-06-26T13:30:03Z")

</div>


