ljharb / qs

A querystring parser with nesting support
BSD 3-Clause "New" or "Revised" License
8.47k stars 730 forks source link

Stringify method with format: "RFC1738" does not encode parentheses -> ( ) #478

Closed veljko3ap closed 1 year ago

veljko3ap commented 1 year ago

Hi 👋🏻

When using QueryString.stringify(params, { format: 'RFC1738' }) with format "RFC1738" for some reason parentheses do not get encoded. Every other special characters gets encoded except for ( and ).

Is this by design or is it a bug?

Kind regards and keep up the good work 🤓

dougwilson commented 1 year ago

Hi @veljko3ap I think it is expected. From RFC1738

Thus, only alphanumerics, the special characters "$-_.+!*'(),", and reserved characters used for their reserved purposes may be used unencoded within a URL.

dougwilson commented 1 year ago

See #390

veljko3ap commented 1 year ago

@dougwilson Thanks for the info, I presumed as much but wanted to verify it :)