Open
Description
The following program crashes:
package main
import (
"golang.org/x/net/html"
"io/ioutil"
"strings"
)
func main() {
nodes, err := html.ParseFragment(strings.NewReader("<svg ><link >0"), nil)
if err != nil {
return
}
for _, n := range nodes {
if err := html.Render(ioutil.Discard, n); err != nil {
panic(err)
}
}
}
panic: html: void element <link> has child nodes
Render must be able handle Parse output. Or otherwise Parse must not accept the input as valid.
On commit 6f62f426de90c0ed6a55207b51476115fcb17237.