Skip to content
New issue

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

html: UnescapeString documentation error #15221

icza opened this issue Apr 10, 2016 · 1 comment

html: UnescapeString documentation error #15221

icza opened this issue Apr 10, 2016 · 1 comment


Copy link

@icza icza commented Apr 10, 2016

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:

@bradfitz bradfitz self-assigned this Apr 10, 2016
@bradfitz bradfitz added this to the Go1.7 milestone Apr 10, 2016
@bradfitz bradfitz changed the title html.UnescapeString() documentation error html: UnescapeString documentation error Apr 10, 2016
Copy link

@gopherbot gopherbot commented Apr 10, 2016

CL mentions this issue.


@gopherbot gopherbot closed this in a44c425 Apr 10, 2016
@golang golang locked and limited conversation to collaborators Apr 10, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants