}
p.reconstructActiveFormattingElements()
p.addText(d)
- p.framesetOK = false
+ if p.framesetOK && strings.TrimLeft(d, whitespace) != "" {
+ // There were non-whitespace characters inserted.
+ p.framesetOK = false
+ }
case StartTagToken:
switch p.tok.DataAtom {
case a.Html:
PASS "FOO
ZOO"
PASS "<html>\x00<frameset></frameset>"
-FAIL "<html> \x00 <frameset></frameset>"
+PASS "<html> \x00 <frameset></frameset>"
PASS "<html>a\x00a<frameset></frameset>"
PASS "<html>\x00\x00<frameset></frameset>"
-FAIL "<html>\x00\n <frameset></frameset>"
+PASS "<html>\x00\n <frameset></frameset>"
FAIL "<html><select>\x00"
PASS "\x00"
PASS "<body>\x00"
PASS "<!doctype html><body><frameset>"
PASS "<!doctype html><p><frameset><frame>"
PASS "<!doctype html><p>a<frameset>"
-FAIL "<!doctype html><p> <frameset><frame>"
+PASS "<!doctype html><p> <frameset><frame>"
PASS "<!doctype html><pre><frameset>"
PASS "<!doctype html><listing><frameset>"
PASS "<!doctype html><li><frameset>"
PASS "<!doctype html><select></select><frameset>"
PASS "<!doctype html><svg></svg><frameset><frame>"
PASS "<!doctype html><math></math><frameset><frame>"
-FAIL "<!doctype html><svg><foreignObject><div> <frameset><frame>"
+PASS "<!doctype html><svg><foreignObject><div> <frameset><frame>"
PASS "<!doctype html><svg>a</svg><frameset><frame>"
PASS "<!doctype html><svg> </svg><frameset><frame>"
PASS "<html>aaa<frameset></frameset>"