~sircmpwn/todo.sr.ht#223: 
URLs seem to be double-URL-encoded when rendered

Test case: add a link to:

http://git.haproxy.org/?p=haproxy.git;a=blob_plain;f=doc/proxy-protocol.txt;hb=HEAD

The raw link is:

http://git.haproxy.org/?p=haproxy.git;a=blob_plain;f=doc/proxy-protocol.txt;hb=HEAD

But when clicking on the link it leads me to:

http://git.haproxy.org/?p=haproxy.git%3Ba=blob_plain%3Bf=doc/proxy-protocol.txt%3Bhb=HEAD

Which results in a 404.

cc ~araspik

Status
REPORTED
Submitter
~emersion
Assigned to
No-one
Submitted
2 months ago
Updated
2 months ago
Labels
No labels applied.

~araspik 2 months ago

The issue seems to be core.sr.ht:srht/markdown.py:L85. Perhaps it's being escaped somewhere else too, or it's something to do with ; and escape_url.

~araspik 2 months ago

It looks like it's an issue with any kind of link (example). I'll check the CommonMark spec - perhaps the semicolons must be escaped. Otherwise, I'll file a bug in mistletoe.

~araspik 2 months ago

Register here or Log in to comment, or comment via email.