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

x/website: html end tag missing on golang.org/dl #33126

Closed
tsaarni opened this issue Jul 15, 2019 · 1 comment
Closed

x/website: html end tag missing on golang.org/dl #33126

tsaarni opened this issue Jul 15, 2019 · 1 comment
Milestone

Comments

@tsaarni
Copy link

@tsaarni tsaarni commented Jul 15, 2019

What did you do?

Download https://golang.org/dl/ and parse it with gopkg.in/xmlpath.v1.ParseHTML.

What did you expect to see?

Parsing should succeed.

What did you see instead?

Error XML syntax error on line 11670: unexpected EOF

The reason seems to be that the web page does not have </html> end tag which gopkg.in/xmlpath.v1.ParseHTML is expecting.

This breaks godeb tool, see issue niemeyer/godeb#44. Workaround is to update parser to gopkg.in/xmlpath.v2.ParseHTML which is more forgiving.

@andybons
Copy link
Member

@andybons andybons commented Jul 15, 2019

Thanks for the issue.

HTML5 does not require all tags be closed. The <html> tag falls into that category.

There is a JSON API that should be used instead of parsing the HTML (which is brittle and prone to change). https://golang.org/dl/?mode=json[&include=all]

Closing since no change is needed on our side (please use the JSON API or a parser that is more compatible with HTML5).

@andybons andybons closed this Jul 15, 2019
@golang golang locked and limited conversation to collaborators Jul 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.