Closed benjif closed 3 years ago
The URI RFC defines the allowed characters in a query string as:
query = *( pchar / "/" / "?" )
Where pchar
is defined as:
pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
pct-encoded = "%" HEXDIG HEXDIG
sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "="
The query string here contains unencoded [
and ]
characters, which are now allowed there. Unfortunately, however, there's a lot of non-compliant URIs around, and the RFC pretty much amounts to "just cope":
If a reserved character is found in a URI component and no delimiting role is known for that character, then it must be interpreted as representing the data octet corresponding to that character's encoding in US-ASCII.
So, for the sake of non-compliant producers, we should loosen things up a bit.
Resolved by #30.