diff options
author | Wim <wim@42.be> | 2021-05-30 00:25:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-30 00:25:30 +0200 |
commit | 4091b6f6b4fe01876f8720332675f9c69be39541 (patch) | |
tree | 07a1f2b2eeba6fb680b5edc19d2d38ec81243c0a /vendor/golang.org/x/net/html/parse.go | |
parent | 766f35554e16ee5462370be714ef29b71745d478 (diff) | |
download | matterbridge-msglm-4091b6f6b4fe01876f8720332675f9c69be39541.tar.gz matterbridge-msglm-4091b6f6b4fe01876f8720332675f9c69be39541.tar.bz2 matterbridge-msglm-4091b6f6b4fe01876f8720332675f9c69be39541.zip |
Update vendor (#1498)
Diffstat (limited to 'vendor/golang.org/x/net/html/parse.go')
-rw-r--r-- | vendor/golang.org/x/net/html/parse.go | 15 |
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 { |