html/template: URL escapes query params #17894
Labels
FrozenDueToAge
NeedsDecision
Feedback is required from experts, contributors, and/or the community before a change can be made.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?The version available on play.golang.org, which appears to be version 1.7
What operating system and processor architecture are you using (
go env
)?Whatever play.golang.org uses
What did you do?
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
https://play.golang.org/p/or2urL8dh0
What did you expect to see?
Expected to see the url pass through the template without being escaped, as documented in https://golang.org/pkg/html/template/ which states "Types HTML, JS, URL, and others from content.go can carry safe content that is exempted from escaping."
What did you see instead?
The template outputs the url as "https://hostname.example.com/test.png?abc=1&def=2", which has the ampersand escaped.
The text was updated successfully, but these errors were encountered: