Discourse encodes fragments of pasted URLs

Discourse encodes characters of fragments in pasted URLs.

E.g.
https://gitpod.io/#https://github.com/eclipse-theia/theia
becomes
https://gitpod.io/#https%3A%2F%2Fgithub.com%2Feclipse-theia%2Ftheia

4 Likes

Let’s see

Gitpod - Online IDE for GitHub

So you are only referring to oneboxed urls?

4 Likes

Ah, there are two links. I didn’t noticed. So, yes, only the link in the box is broken.

This appears to be fixed in DEV: Replace custom uri_encode logic with Addressable by CvX · Pull Request #420 · discourse/onebox · GitHub

I’ve added the reported URL to #uri_encode specs.

4 Likes

Note: This still happens in Discourse version 2.4.0.beta9 (c15d702ae6):

In a Private Message, URLs like https://gitpod.io/#snapshot/abcd-1234 still get wrongly converted to https://gitpod.io/#snapshot%2Fabcd-1234

I notice that Discourse 2.4.0.beta10 is out now – may try to upgrade and see if that helps.

I just tried it in a PM and it worked.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.