From: Nigel Tao Date: Thu, 2 Aug 2012 23:29:16 +0000 (+1000) Subject: html: make the low-level tokenizer also skip end-tag attributes. X-Git-Tag: go1.1rc2~2721 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=1916db786fe8a9ff2aa775eb6f68c3a7ff00f2c6;p=gostls13.git html: make the low-level tokenizer also skip end-tag attributes. R=andybalholm CC=golang-dev https://golang.org/cl/6453071 --- diff --git a/src/pkg/exp/html/token.go b/src/pkg/exp/html/token.go index 7ee0efc669..38d8024e0e 100644 --- a/src/pkg/exp/html/token.go +++ b/src/pkg/exp/html/token.go @@ -691,7 +691,7 @@ loop: // readStartTag reads the next start tag token. The opening ". - if z.tt != EndTagToken { - for moreAttr { - var key, val []byte - key, val, moreAttr = z.TagAttr() - t.Attr = append(t.Attr, Attribute{"", atom.String(key), string(val)}) - } + for moreAttr { + var key, val []byte + key, val, moreAttr = z.TagAttr() + t.Attr = append(t.Attr, Attribute{"", atom.String(key), string(val)}) } if a := atom.Lookup(name); a != 0 { t.DataAtom, t.Data = a, a.String()