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

Add parameter spaceAsPlus to ByteSerialize #888

Open
tuplecats opened this issue Nov 28, 2023 · 0 comments · May be fixed by #928
Open

Add parameter spaceAsPlus to ByteSerialize #888

tuplecats opened this issue Nov 28, 2023 · 0 comments · May be fixed by #928

Comments

@tuplecats
Copy link

Hello! I think it would be nice to be able to enable/disable replacing "%20" with "+" in ByteSerialize struct.

This parameter and its usage described here https://url.spec.whatwg.org/#string-percent-encode-after-encoding

kaffarell added a commit to kaffarell/rust-url that referenced this issue Apr 30, 2024
Previously the space character was exclusively encoded to '+'. This is
wrong, as the URL Standard [0] specifies that the default is '%20'.
Another function has been introduced as well, which replicates the old
behavior and converts spaces to '+'.
Notice that this breaks the default behavior and could lead to bugs.

[0]: https://url.spec.whatwg.org/#string-percent-encode-after-encoding

Fixes: servo#927
Fixes: servo#888

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
@kaffarell kaffarell linked a pull request Apr 30, 2024 that will close this issue
kaffarell added a commit to kaffarell/rust-url that referenced this issue Apr 30, 2024
Previously the space character was exclusively encoded to '+'. This is
wrong, as the URL Standard [0] specifies that the default is '%20'.
Another function has been introduced as well, which replicates the old
behavior and converts spaces to '+'.
Notice that this breaks the default behavior and could lead to bugs.

[0]: https://url.spec.whatwg.org/#string-percent-encode-after-encoding

Fixes: servo#927
Fixes: servo#888

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
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

Successfully merging a pull request may close this issue.

1 participant