querystring.parse() not handling trailing spaces (+) in parameters correctly #14215
Labels
duplicate
Issues and PRs that are duplicates of other issues or PRs.
querystring
Issues and PRs related to the built-in querystring module.
I'm seeing an issue with
querystring.parse()
in v8.4.1 that I don't have with v6.11.1. When I parseapplication/x-www-form-urlencoded
form data, inputs containing returns and line feeds with a trailing space on the last line aren't parsing correctly.Let's say I have <textarea name="content"> that contains the following on submit:
I get the expected result after parsing the form body:
However, if I add a trailing space after "bar", I get the following form body:
And the following from
querystring.parse()
:I'm using formidable and thought it might be a bug in that, so I wrote a simple parser myself and still have the same issue.
As mentioned previously, everything works as expected using v6.11.1. Not sure if this is an intentional change that I missed or a bug.
The text was updated successfully, but these errors were encountered: