mirror of
https://github.com/golang/go
synced 2024-11-20 08:14:41 -07:00
html: properly close <marquee> elements.
Pass tests1.dat, test 80: <a href=a>aa<marquee>aa<a href=b>bb</marquee>aa | <html> | <head> | <body> | <a> | href="a" | "aa" | <marquee> | "aa" | <a> | href="b" | "bb" | "aa" Also pass tests through test 82: <!DOCTYPE html><spacer>foo R=nigeltao CC=golang-dev https://golang.org/cl/5319071
This commit is contained in:
parent
33f1d47b38
commit
cf6a712162
@ -635,6 +635,10 @@ func inBodyIM(p *parser) (insertionMode, bool) {
|
|||||||
p.inBodyEndTagFormatting(p.tok.Data)
|
p.inBodyEndTagFormatting(p.tok.Data)
|
||||||
case "address", "article", "aside", "blockquote", "button", "center", "details", "dir", "div", "dl", "fieldset", "figcaption", "figure", "footer", "header", "hgroup", "listing", "menu", "nav", "ol", "pre", "section", "summary", "ul":
|
case "address", "article", "aside", "blockquote", "button", "center", "details", "dir", "div", "dl", "fieldset", "figcaption", "figure", "footer", "header", "hgroup", "listing", "menu", "nav", "ol", "pre", "section", "summary", "ul":
|
||||||
p.popUntil(defaultScopeStopTags, p.tok.Data)
|
p.popUntil(defaultScopeStopTags, p.tok.Data)
|
||||||
|
case "applet", "marquee", "object":
|
||||||
|
if p.popUntil(defaultScopeStopTags, p.tok.Data) {
|
||||||
|
p.clearActiveFormattingElements()
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
p.inBodyEndTagOther(p.tok.Data)
|
p.inBodyEndTagOther(p.tok.Data)
|
||||||
}
|
}
|
||||||
|
@ -133,7 +133,7 @@ func TestParser(t *testing.T) {
|
|||||||
rc := make(chan io.Reader)
|
rc := make(chan io.Reader)
|
||||||
go readDat(filename, rc)
|
go readDat(filename, rc)
|
||||||
// TODO(nigeltao): Process all test cases, not just a subset.
|
// TODO(nigeltao): Process all test cases, not just a subset.
|
||||||
for i := 0; i < 80; i++ {
|
for i := 0; i < 83; i++ {
|
||||||
// Parse the #data section.
|
// Parse the #data section.
|
||||||
b, err := ioutil.ReadAll(<-rc)
|
b, err := ioutil.ReadAll(<-rc)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user