Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
x/net: html.Parse does not parse self closing token correctly #26566
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
I think parser behaves correctly here. Your input is non-conformant — spec tells that for video element "Neither tag is omissible" — so your input is parsed as if video element holds
This program prints parsed tree nesting: https://play.golang.org/p/jHCa0PEpHGC
Note that browsers also parse such input in a similar fashion — here's what tree produced Safari: