What version of Go are you using (go version)?
$ go version
go version go1.12.5 linux/amd64
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (go env)?
$ go env
GOHOSTARCH="amd64"
GOHOSTOS="linux"
What did you do?
this is related to #21563
https://play.golang.com/p/Fh08ftsK9YQ
pass the string "<a href=example.com?param=value×tamp=123>link" to html.UnescapeString
What did you expect to see?
according to https://html.spec.whatwg.org/multipage/parsing.html#character-reference-state
in an attribute, no character reference is parsed and string remains intact
it seems like an attempt was made to do this, but attribute is a constant?
https://golang.org/src/html/escape.go?s=1296:1319#L57
https://golang.org/src/html/escape.go?s=3112:3194#L142
I would expect the same string to come back
What did you see instead?
× is changed to ×
What version of Go are you using (
go version)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env)?What did you do?
this is related to #21563
https://play.golang.com/p/Fh08ftsK9YQ
pass the string "<a href=example.com?param=value×tamp=123>link" to html.UnescapeString
What did you expect to see?
according to https://html.spec.whatwg.org/multipage/parsing.html#character-reference-state
in an attribute, no character reference is parsed and string remains intact
it seems like an attempt was made to do this, but attribute is a constant?
https://golang.org/src/html/escape.go?s=1296:1319#L57
https://golang.org/src/html/escape.go?s=3112:3194#L142
I would expect the same string to come back
What did you see instead?
× is changed to ×