Skip to content

net/url: QueryEscape() doesn't escape tilde #47379

@alive

Description

@alive

What version of Go are you using (go version)?

$ go version
go version go1.16.6 darwin/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

see go version

What did you do?

https://play.golang.org/p/meXdB3_Iklu

What did you expect to see?

I expected to see the tilda characters converted to their URL escaped values: %7E.

What did you see instead?

The tilda characters were not converted.

According to this: https://jkorpela.fi/tilde.html tildas are no long a character that must be encoded. However, I think they still should be for safety, or at least there should be an option to encode them. Chrome browser, for example, still encodes tildas in the body of a post request, which is where my use case lies.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeWaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions