One Box url encoding of already encoded comma

There seems to have been a recent change in Discourse with One Box url encoding.

I run a website that generates links like: www.discourse.org/?a=a%2Cb where %2C is the encoded version of the comma. If I paste this link to a one box:

The generated link is:

https://www.discourse.org/?a=a%252Cb

The encoded comma became %252C.

If you run encodeURIComponent(encodeURIComponent(',')) the result is %252C. IMHO the correct behavior would be not to encode already encoded characters. For example the ampersand works correctly with the latest discourse (Onebox incorrectly encodes urls with ampersands).

4 Likes

Is this a new bug @techAPJ?

3 Likes

I had a similar “doubly encoded apostrophe” happen 15 days ago. i.e.

as
https://en.m.wikipedia.org/wiki/Henry%27s_pocket

while using Brave

5 Likes

Fixed via:

Thanks for reporting this issue @Robinio :+1:

6 Likes