]> Cypherpunks repositories - gostls13.git/commitdiff
html: fix nesting when parsing a close tag.
authorYasuhiro Matsumoto <mattn.jp@gmail.com>
Thu, 30 Jun 2011 13:16:33 +0000 (23:16 +1000)
committerNigel Tao <nigeltao@golang.org>
Thu, 30 Jun 2011 13:16:33 +0000 (23:16 +1000)
R=nigeltao
CC=golang-dev
https://golang.org/cl/4636067

src/pkg/html/parse.go

index 2ef90a873216cfe6f4e1e11c91d70937bb7ef242..c2931773fafb97f76b67134ce6e569a1b10012c4 100644 (file)
@@ -413,7 +413,10 @@ func inBodyIM(p *parser) (insertionMode, bool) {
                                p.pop()
                        }
                default:
-                       // TODO.
+                       // TODO: any other end tag
+                       if p.tok.Data == p.top().Data {
+                               p.pop()
+                       }
                }
        }
        if endP {