mirror of
https://github.com/golang/go
synced 2024-11-21 22:34:48 -07:00
html: parse <nobr> elements
Pass tests3.dat, test 20: <!doctype html><nobr><nobr><nobr> | <!DOCTYPE html> | <html> | <head> | <body> | <nobr> | <nobr> | <nobr> Also pass tests through test 22: <!doctype html><html><body><p><table></table></body></html> R=nigeltao CC=golang-dev https://golang.org/cl/5438056
This commit is contained in:
parent
4c113ffe16
commit
68e7363b56
@ -679,6 +679,13 @@ func inBodyIM(p *parser) bool {
|
||||
case "b", "big", "code", "em", "font", "i", "s", "small", "strike", "strong", "tt", "u":
|
||||
p.reconstructActiveFormattingElements()
|
||||
p.addFormattingElement(p.tok.Data, p.tok.Attr)
|
||||
case "nobr":
|
||||
p.reconstructActiveFormattingElements()
|
||||
if p.elementInScope(defaultScopeStopTags, "nobr") {
|
||||
p.inBodyEndTagFormatting("nobr")
|
||||
p.reconstructActiveFormattingElements()
|
||||
}
|
||||
p.addFormattingElement(p.tok.Data, p.tok.Attr)
|
||||
case "applet", "marquee", "object":
|
||||
p.reconstructActiveFormattingElements()
|
||||
p.addElement(p.tok.Data, p.tok.Attr)
|
||||
|
@ -152,7 +152,7 @@ func TestParser(t *testing.T) {
|
||||
{"doctype01.dat", -1},
|
||||
{"tests1.dat", -1},
|
||||
{"tests2.dat", -1},
|
||||
{"tests3.dat", 20},
|
||||
{"tests3.dat", 23},
|
||||
}
|
||||
for _, tf := range testFiles {
|
||||
f, err := os.Open("testdata/webkit/" + tf.filename)
|
||||
|
Loading…
Reference in New Issue
Block a user