mirror of
https://github.com/golang/go
synced 2024-11-12 06:20:22 -07:00
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
This commit is contained in:
parent
e9025df7ad
commit
557ba72e69
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user