The <title> element was getting removed from the stack of open elements,
when its parent, the <head> element should have been removed instead.
Pass 2 additional tests.
R=nigeltao
CC=golang-dev
https://golang.org/cl/
6449101
return true
case a.Base, a.Basefont, a.Bgsound, a.Link, a.Meta, a.Noframes, a.Script, a.Style, a.Title:
p.oe = append(p.oe, p.head)
- defer p.oe.pop()
+ defer p.oe.remove(p.head)
return inHeadIM(p)
case a.Head:
// Ignore the token.
PASS "<!doctype html><body><title>X</title>"
PASS "<!doctype html><table><title>X</title></table>"
-FAIL "<!doctype html><head></head><title>X</title>"
-FAIL "<!doctype html></head><title>X</title>"
+PASS "<!doctype html><head></head><title>X</title>"
+PASS "<!doctype html></head><title>X</title>"
PASS "<!doctype html><table><meta></table>"
PASS "<!doctype html><table>X<tr><td><table> <meta></table></table>"
PASS "<!doctype html><html> <head>"