Re: [whatwg/url] Proposal of .toString({ concise: true }) for nicer output with empty values (#469)

Distinguishing between `null` and `''` in `URLSearchParams` would allow losslessly converting arbitrary queryparam strings between `URLSearchParams` and back. This could matter if the resulting URL is hashed somewhere outside your control or if you care about correctness. The UR**I** RFC says that the query string can contain basically any characters:

          query       = *( pchar / "/" / "?" )

          pchar         = unreserved / pct-encoded / sub-delims / ":" / "@"
          unreserved  = ALPHA / DIGIT / "-" / "." / "_" / "~"
          sub-delims  = "!" / "$" / "&" / "'" / "(" / ")"
                  / "*" / "+" / "," / ";" / "="

https://tools.ietf.org/html/rfc3986#section-3.4

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/url/issues/469#issuecomment-778333244

Received on Friday, 12 February 2021 17:30:17 UTC