Skip to content

Fixed encoding of spaces #24

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

Merged
merged 2 commits into from
May 22, 2021

Conversation

dederer
Copy link
Contributor

@dederer dederer commented May 22, 2021

Spaces must be encoded as "+" (#23). To fix it, I replaced functions encodeURIComponent and decodeURIComponent with encodeFormURLComponent and decodeFormURLComponent, corrected the sample code in the README.md file, and added tests.

Spaces must be replaced by `+` instead of `%20`.

https://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.1

> application/x-www-form-urlencoded Forms submitted with this content type must
> be encoded as follows: <...> Space characters are replaced by `+', and then
> reserved characters are escaped as described in [RFC1738] <...>

Fix purescript-contrib#23
@thomashoneyman thomashoneyman merged commit ec59903 into purescript-contrib:main May 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants