diff --git a/src/pkg/html/parse.go b/src/pkg/html/parse.go index c6c96e50e0..f47d4ea147 100644 --- a/src/pkg/html/parse.go +++ b/src/pkg/html/parse.go @@ -651,6 +651,9 @@ func inBodyIM(p *parser) (insertionMode, bool) { } case "base", "basefont", "bgsound", "command", "link", "meta", "noframes", "script", "style", "title": return useTheRulesFor(p, inBodyIM, inHeadIM) + case "image": + p.tok.Data = "img" + return inBodyIM, false default: // TODO. p.addElement(p.tok.Data, p.tok.Attr) diff --git a/src/pkg/html/parse_test.go b/src/pkg/html/parse_test.go index 1f4ffa9564..27979225b3 100644 --- a/src/pkg/html/parse_test.go +++ b/src/pkg/html/parse_test.go @@ -133,7 +133,7 @@ func TestParser(t *testing.T) { n int }{ // TODO(nigeltao): Process all the test cases from all the .dat files. - {"tests1.dat", 89}, + {"tests1.dat", 92}, {"tests2.dat", 0}, {"tests3.dat", 0}, } @@ -210,6 +210,7 @@ var renderTestBlacklist = map[string]bool{ // The second will be reparented to the first 's parent. This // results in an whose parent is an , which is not 'well-formed'. `
XCY`: true, - // The second will be reparented, similar to the case above. + // More cases of being reparented: `ababrx
aoe`: true, + `

`: true, }