We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
QueryEscape
go version
$ go version go1.19.2
But really, affects 1.18 and other versions too
Yes
go env
It's universal anywhere, since it's a bug in logic implementation of internal shouldEscape method
shouldEscape
Playground link: https://go.dev/play/p/WXXx4EiSy_E
Already escaped string should not be escaped again (example behavior: Javascript encodeURIComponent method and similar)
encodeURIComponent
It gets escaped as many times as the method is called.
The text was updated successfully, but these errors were encountered:
The + sign carries semantic meaning within url query escaping, in general it won't be possible to know if it has been escaped before.
+
Closing as working as intended.
Sorry, something went wrong.
@seankhliao It also escapes % sign as shown in the playground, it is not working as intended.
%
The JavaScript encodeURIComponent function also escapes a % character in its input string, encoding it as %25.
%25
We aren't going to make any changes here.
No branches or pull requests
What version of Go are you using (
go version
)?But really, affects 1.18 and other versions too
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?It's universal anywhere, since it's a bug in logic implementation of internal
shouldEscape
methodWhat did you do?
Playground link: https://go.dev/play/p/WXXx4EiSy_E
What did you expect to see?
Already escaped string should not be escaped again (example behavior: Javascript
encodeURIComponent
method and similar)What did you see instead?
It gets escaped as many times as the method is called.
The text was updated successfully, but these errors were encountered: