Skip to content
New issue

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

Trailing space as + causes a string param to not be decoded #28

Open
DJphilomath opened this issue Jan 19, 2018 · 1 comment
Open

Trailing space as + causes a string param to not be decoded #28

DJphilomath opened this issue Jan 19, 2018 · 1 comment

Comments

@DJphilomath
Copy link

Example

ToCountry=US&Body=No%2C+I%E2%80%99m+ill+&FromCountry=US

Notice the + sign at the end of the Body param

After calling .parse the Body param is not decoded

{"ToCountry":"US","Body":"No%2C I%E2%80%99m ill ","FromCountry":"US"}

It works if the trailing + sign is at the end of the string

ToCountry=US&FromCountry=US&Body=No%2C+I%E2%80%99m+ill+

Once parsed

{"ToCountry":"US","FromCountry":"US","Body":"No, I’m ill "}
@UrbaniakM
Copy link

UrbaniakM commented Jul 8, 2019

https://playcode.io/362931?tabs=script.js,preview,console

Everything works fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants