summaryrefslogtreecommitdiffstats
path: root/vendor/golang.org/x/net/html/parse.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/golang.org/x/net/html/parse.go')
-rw-r--r--vendor/golang.org/x/net/html/parse.go15
1 files changed, 14 insertions, 1 deletions
diff --git a/vendor/golang.org/x/net/html/parse.go b/vendor/golang.org/x/net/html/parse.go
index 2cd12fc8..f91466f7 100644
--- a/vendor/golang.org/x/net/html/parse.go
+++ b/vendor/golang.org/x/net/html/parse.go
@@ -728,7 +728,13 @@ func inHeadNoscriptIM(p *parser) bool {
return inBodyIM(p)
case a.Basefont, a.Bgsound, a.Link, a.Meta, a.Noframes, a.Style:
return inHeadIM(p)
- case a.Head, a.Noscript:
+ case a.Head:
+ // Ignore the token.
+ return true
+ case a.Noscript:
+ // Don't let the tokenizer go into raw text mode even when a <noscript>
+ // tag is in "in head noscript" insertion mode.
+ p.tokenizer.NextIsNotRawText()
// Ignore the token.
return true
}
@@ -1790,6 +1796,13 @@ func inSelectIM(p *parser) bool {
return true
case a.Script, a.Template:
return inHeadIM(p)
+ case a.Iframe, a.Noembed, a.Noframes, a.Noscript, a.Plaintext, a.Style, a.Title, a.Xmp:
+ // Don't let the tokenizer go into raw text mode when there are raw tags
+ // to be ignored. These tags should be ignored from the tokenizer
+ // properly.
+ p.tokenizer.NextIsNotRawText()
+ // Ignore the token.
+ return true
}
case EndTagToken:
switch p.tok.DataAtom {