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

URL encode doesn't encode all characters #14

Open
contentfree opened this issue May 3, 2023 · 6 comments
Open

URL encode doesn't encode all characters #14

contentfree opened this issue May 3, 2023 · 6 comments

Comments

@contentfree
Copy link

I'm trying to encode "this & that" and it's produces this%20&%20that instead of this%20%26%20that

@devnoname120
Copy link

devnoname120 commented Sep 5, 2023

DevToys shows the output of PathEscape() rather than JavaScript's encodeURIComponent() which doesn't exist in Golang.
Ideally it should display both outputs, but that's a feature suggestion rather than a bug.

encodeURI(): this%20&%20that
encodeURIComponent(): this%20%26%20that

See:

@contentfree
Copy link
Author

contentfree commented Sep 5, 2023

Just ran into this again when trying to run encode success=true. The expected output is success%3Dtrue but DevToys gives success=true

@contentfree
Copy link
Author

Wild that you responded eight hours ago after months and I just coincidentally ran into the problem again today. The universe is weird!

@devnoname120
Copy link

devnoname120 commented Sep 5, 2023

My code in the go.dev link also works on this example. I will submit a PR later :)

@JeasonKim
Copy link

My code in the go.dev link also works on this example. I will submit a PR later :)

Have you completed the pull request for this feature?

@devnoname120
Copy link

I haven't. I have other priorities right now.

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

3 participants