Link containing "?id=" is truncated when markdown is processed

hi.

I have the following problem when I copy this link to my website:
https://www.barks.jp/news/?id=1000203176

the markdown being processed truncates the link after “news/” and the generated html <a> tag gets an id attribute with ‘1000203176’.

resulting html:
<a href="https://www.barks.jp/news" id="1000203176">...</a>

I have tried to escape characters of the url, but it did not help.

I could eventually solve this issue by using html instead of markdown in my .md file, but I would still like to understand why this is happening…

@mathmax,

but I would still like to understand why this is happening…

It happens because that behaviour is designed to happen :slight_smile:

According the docs on Link Attributes

A great new feature you can take advantage of is providing link attributes directly via the markdown syntax. This allows you to easily add class , id , rel , and target HTML attributes without the need of Markdown Extra.

// markdown
[Unique Button](../some-page?id=important-button)
// html
<a href="/your/pages/some-page" id="important-button">Unique Button</a>
1 Like

That’s a bummer :joy: I guess it was not thought, that someone might want to have id or class as a query string instead of attributes :slight_smile:

Thank you! This is actually a useful feature. :slight_smile:

Adding the following allows me to skip processing attributes which is just what I needed:

&noprocess
1 Like