Commit 557ba72e authored by Andrew Balholm's avatar Andrew Balholm Committed by Nigel Tao

html: ignore <head> tags in <head> element

Pass tests3.dat, test 12:
<!DOCTYPE html><HTML><META><HEAD></HEAD></HTML>

| <!DOCTYPE html>
| <html>
|   <head>
|     <meta>
|   <body>

Also pass tests through test 19:
<!DOCTYPE html><html><head></head><body><ul><li><div><p><li></ul></body></html>

R=nigeltao
CC=golang-dev
https://golang.org/cl/5436069
parent e9025df7
......@@ -518,6 +518,9 @@ func inHeadIM(p *parser) bool {
p.setOriginalIM()
p.im = textIM
return true
case "head":
// Ignore the token.
return true
default:
implied = true
}
......
......@@ -152,7 +152,7 @@ func TestParser(t *testing.T) {
{"doctype01.dat", -1},
{"tests1.dat", -1},
{"tests2.dat", -1},
{"tests3.dat", 12},
{"tests3.dat", 20},
}
for _, tf := range testFiles {
f, err := os.Open("testdata/webkit/" + tf.filename)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment