#2906 markdown: URLs with angle brackets get converted to relative URLs instead of absolute
Closed: Fixed 6 years ago Opened 6 years ago by kparal.

If you look at https://pagure.io/taskotron/resultsdb there's a markdown document with this content:

The API documentation can be found at <http://docs.resultsdb20.apiary.io/>.

Pagure converts that URL into

https://pagure.io/taskotron/%3Chttp://docs.resultsdb20.apiary.io/%3E

which is obviously wrong. It assumes angle brackets means a relative URL, but they don't.

It can be easily demonstrated even here in comments. Click on this: https://getfedora.org and compare with https://getfedora.org .


From my reading of https://daringfireball.net/projects/markdown/syntax#link I don't think links can be defined with <..>.

The only time it seems to be allowed is when defining a reference style link, for example:

foobar example

It's described here:
https://daringfireball.net/projects/markdown/syntax#misc

Miscellaneous
Automatic Links

Markdown supports a shortcut style for creating “automatic” links for URLs and email addresses: simply surround the URL or email address with angle brackets. What this means is that if you want to show the actual text of a URL or email address, and also have it be a clickable link, you can do this:

<http://example.com/>

Markdown will turn this into:

<a href="http://example.com/">http://example.com/</a>

Hm, indeed. Ok let's check where this isn't behaving as expected.

Ok, I think I found the issue but solving it might be a little hairy, I'll see what I can do

Metadata Update from @pingou:
- Issue assigned to pingou

6 years ago

Metadata Update from @pingou:
- Issue tagged with: bug

6 years ago

Login to comment on this ticket.

Metadata