summaryrefslogtreecommitdiff
path: root/vendor/golang.org/x/net/html
diff options
context:
space:
mode:
authordependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2021-08-05 12:20:04 +0000
committerGitHub <noreply@github.com>2021-08-05 12:20:04 +0000
commiteb2e99101aa8e774009b2f177fb4c4c4be54ed59 (patch)
treed1eced42fef958ccfd5aa13dbaf0455b95ac1863 /vendor/golang.org/x/net/html
parent117583c293713f2baa920c4035e820ad59fe6622 (diff)
downloadpodman-eb2e99101aa8e774009b2f177fb4c4c4be54ed59.tar.gz
podman-eb2e99101aa8e774009b2f177fb4c4c4be54ed59.tar.bz2
podman-eb2e99101aa8e774009b2f177fb4c4c4be54ed59.zip
Bump k8s.io/apimachinery from 0.21.3 to 0.22.0
Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.21.3 to 0.22.0. - [Release notes](https://github.com/kubernetes/apimachinery/releases) - [Commits](https://github.com/kubernetes/apimachinery/compare/v0.21.3...v0.22.0) --- updated-dependencies: - dependency-name: k8s.io/apimachinery dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Diffstat (limited to 'vendor/golang.org/x/net/html')
-rw-r--r--vendor/golang.org/x/net/html/parse.go24
1 files changed, 23 insertions, 1 deletions
diff --git a/vendor/golang.org/x/net/html/parse.go b/vendor/golang.org/x/net/html/parse.go
index f91466f7c..038941d70 100644
--- a/vendor/golang.org/x/net/html/parse.go
+++ b/vendor/golang.org/x/net/html/parse.go
@@ -663,6 +663,24 @@ func inHeadIM(p *parser) bool {
// Ignore the token.
return true
case a.Template:
+ // TODO: remove this divergence from the HTML5 spec.
+ //
+ // We don't handle all of the corner cases when mixing foreign
+ // content (i.e. <math> or <svg>) with <template>. Without this
+ // early return, we can get into an infinite loop, possibly because
+ // of the "TODO... further divergence" a little below.
+ //
+ // As a workaround, if we are mixing foreign content and templates,
+ // just ignore the rest of the HTML. Foreign content is rare and a
+ // relatively old HTML feature. Templates are also rare and a
+ // relatively new HTML feature. Their combination is very rare.
+ for _, e := range p.oe {
+ if e.Namespace != "" {
+ p.im = ignoreTheRemainingTokens
+ return true
+ }
+ }
+
p.addElement()
p.afe = append(p.afe, &scopeMarker)
p.framesetOK = false
@@ -683,7 +701,7 @@ func inHeadIM(p *parser) bool {
if !p.oe.contains(a.Template) {
return true
}
- // TODO: remove this divergence from the HTML5 spec.
+ // TODO: remove this further divergence from the HTML5 spec.
//
// See https://bugs.chromium.org/p/chromium/issues/detail?id=829668
p.generateImpliedEndTags()
@@ -2127,6 +2145,10 @@ func afterAfterFramesetIM(p *parser) bool {
return true
}
+func ignoreTheRemainingTokens(p *parser) bool {
+ return true
+}
+
const whitespaceOrNUL = whitespace + "\x00"
// Section 12.2.6.5