We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It results unexpected encoding, depending of the type of input used on set query
var parsed = urlParse('http://go.com/'); parsed.set('query', 'promo=20%25'); console.log(parsed.href); //outputs: "http://go.com/?promo=20%25" parsed.set('query', {promo:'20%25'}); console.log(parsed.href); //outputs: "http://go.com/?promo=20%2525"
https://codepen.io/herbertpimentel/pen/vYeeVdz?editors=0011
Expected result: in both cases have the same output.
The text was updated successfully, but these errors were encountered:
This is expected, in the first case the query string is first parsed so you get
{ promo: '20%' }
which is then stringified to 'promo=20%25'.
'promo=20%25'
In the second case you are providing an already parsed query string which is only stringified.
> querystring.stringify({ promo: '20%25' }) 'promo=20%2525'
to get the expected result you should use { promo: '20%' }
> querystring.stringify({ promo: '20%' }) 'promo=20%25'
Sorry, something went wrong.
No branches or pull requests
It results unexpected encoding, depending of the type of input used on set query
https://codepen.io/herbertpimentel/pen/vYeeVdz?editors=0011
Expected result: in both cases have the same output.
The text was updated successfully, but these errors were encountered: