Open ghost opened 4 years ago
I don't see anything in RFC3986 which would require those characters to be percent encoded.
The URL spec is possibly a more useful reference. The query part of a URL is not required to have the characters !
, (
, )
, or *
encoded. But when producing a query string, the spec states:
The application/x-www-form-urlencoded percent-encode set contains all code points, except the ASCII alphanumeric, U+002A (*), U+002D (-), U+002E (.), and U+005F (_).
According to this, !
, )
, and (
should be encoded when using query_param
, but *
should not be.
@haarg In the URL spec, I see that '
should be percent-encoded as well, for http, https, file, ws, and wss URLs (these are called special schemes by the spec):
The special-query percent-encode set is the query percent-encode set and U+0027 (').
The following strings are not encoded in query_param.
! * () '
The code is shown below.Shouldn't it be encoded if it conforms to RFC3986? Or is there a way to encode the above characters using query_param?