Closed
Description
Go 1.6, Go Playground environment
Documentation of html.UnescapeString()
contains a mistake. Quoting:
It unescapes a larger range of entities than EscapeString escapes. For example,
"á"
unescapes to "á", as does"á"
and "&xE1;".
It should be á
(there is a missing hashmark #
in the doc).
The implementation is good, but it is documented falsely.
fmt.Println(html.UnescapeString(`&xE1;`)) // Output: &xE1;
fmt.Println(html.UnescapeString(`á`)) // Output: á
Output is as expected.
Playground example: