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

https://gitpod.io/#https://github.com/eclipse-theia/theia

Gitpod - Dashboard

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 https://github.com/discourse/onebox/pull/420

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

5 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.

2 Likes

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