My understanding of the general form of a URL is that it looks as follows:
://?#
>
STD 66 defines the fragment as:
fragment = *( pchar / "/" / "?" )
So aside from characters from the pchar
set (unreserved / pct-encoded / sub-delims / ":" / "@"
), the /
and the ?
can be used in the fragment directly (i.e., percent-encoding is not needed).
The /
is even mentioned explicitly in the text:
The characters slash ("/") and question mark ("?") are allowed to represent data within the fragment identifier. Beware that some older, erroneous implementations may not handle this data correctly when it is used as the base URI for relative references (Section 5.1).