From: Nigel Tao Date: Mon, 20 Aug 2012 01:04:36 +0000 (+1000) Subject: exp/html: make the parser manipulate the tokenizer via exported methods X-Git-Tag: go1.1rc2~2627 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=2b14a48d5474831ff992a180ca563a22276a2332;p=gostls13.git exp/html: make the parser manipulate the tokenizer via exported methods instead of touching the tokenizer's internal state. R=andybalholm CC=golang-dev https://golang.org/cl/6446153 --- diff --git a/src/pkg/exp/html/parse.go b/src/pkg/exp/html/parse.go index d4b1227768..2ef0241deb 100644 --- a/src/pkg/exp/html/parse.go +++ b/src/pkg/exp/html/parse.go @@ -402,7 +402,7 @@ func (p *parser) reconstructActiveFormattingElements() { func (p *parser) read() error { // CDATA sections are allowed only in foreign content. n := p.oe.top() - p.tokenizer.cdataOK = n != nil && n.Namespace != "" + p.tokenizer.AllowCDATA(n != nil && n.Namespace != "") p.tokenizer.Next() p.tok = p.tokenizer.Token() @@ -1613,9 +1613,9 @@ func inSelectIM(p *parser) bool { p.parseImpliedToken(EndTagToken, a.Select, a.Select.String()) return false } - // Ignore the token. // In order to properly ignore