Consider the following link:
https://doc-0g-bc-docs.googleusercontent.com/docs/securesc/ha0ro937gcuc7l7deffksulhg5h7mbp1/9la5prt2u93men2ft6831kkki73u94n0/1403496000000/02058467015715614041/*/0ByTrbPQHgxJddnBTSlUxZVNBOG8?h=16653014193614665626
If I try to include it as a link in this post using the "displaced URL" syntax (link), the href of the resulting <a>
(in the output, not the markdown) gets converted to:
https://doc-0g-bc-docs.googleusercontent.com/docs/securesc/ha0ro937gcuc7l7deffksulhg5h7mbp1/9la5prt2u93men2ft6831kkki73u94n0/1403496000000/02058467015715614041/%2a/0ByTrbPQHgxJddnBTSlUxZVNBOG8?h=16653014193614665626
If you scroll to the right, you will see that the difference is that *
in the URL has been %-encoded to %2a
. But here is the problem: the version of the URL with the *
goes to the right place (here is a link from a shortener: link - you should get a PDF of the Ramayana), while the link above, which has %2a
, does not.
I'm not sure whether this is a bug in SE or in Google, but even if it is a bug at Google, it would probably be a good idea for SE to have a workaround for it.
Note also: If I try to use a literal <a>
tag in my post to include the link, it fails to render: (link). The same URL with the *
removed links just fine using a literal <a>
tag (link) (albeit there's nothing at that URL), so this is probably a symptom of the same underlying problem.
googleusercontent.com
server though; any character, even though unreserved, SHOULD be supported as encoded and unencoded (withSHOULD
interpreted in the RFC sense).#Whatever::text
(an anchor in an api) to#Whatever%3A%3Atext
- quite annoying. Even if it breaks the spec, it would be better to escape html characters and use the url as input by the user.sub-delims
. My interpretation of that is safe to percent-encode an asterisk. That said, it may be worth changing it anyway, if even Google is (illegally, as far as I can tell) treating the two differently.&
from delimiting parameters in the query string). But if the character has no special meaning in the first place, there's nothing to change; after decoding it, it will be treated as the same literal character as it would have if not encoded in the first place.