diff options
author | 2024-02-12 10:04:32 +0000 | |
---|---|---|
committer | 2024-02-12 10:04:32 +0000 | |
commit | db45e65e89b90af499d52a314c31cd8499bfeb2e (patch) | |
tree | 9681614aab210d65649ffa4684ff8500f215a01c /vendor/golang.org/x/net/html/token.go | |
parent | [chore]: Bump golang.org/x/crypto from 0.18.0 to 0.19.0 (#2632) (diff) | |
download | gotosocial-db45e65e89b90af499d52a314c31cd8499bfeb2e.tar.xz |
[chore]: Bump golang.org/x/oauth2 from 0.16.0 to 0.17.0 (#2629)
Diffstat (limited to 'vendor/golang.org/x/net/html/token.go')
-rw-r--r-- | vendor/golang.org/x/net/html/token.go | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/vendor/golang.org/x/net/html/token.go b/vendor/golang.org/x/net/html/token.go index de67f938a..3c57880d6 100644 --- a/vendor/golang.org/x/net/html/token.go +++ b/vendor/golang.org/x/net/html/token.go @@ -910,9 +910,6 @@ func (z *Tokenizer) readTagAttrKey() { return } switch c { - case ' ', '\n', '\r', '\t', '\f', '/': - z.pendingAttr[0].end = z.raw.end - 1 - return case '=': if z.pendingAttr[0].start+1 == z.raw.end { // WHATWG 13.2.5.32, if we see an equals sign before the attribute name @@ -920,7 +917,9 @@ func (z *Tokenizer) readTagAttrKey() { continue } fallthrough - case '>': + case ' ', '\n', '\r', '\t', '\f', '/', '>': + // WHATWG 13.2.5.33 Attribute name state + // We need to reconsume the char in the after attribute name state to support the / character z.raw.end-- z.pendingAttr[0].end = z.raw.end return @@ -939,6 +938,11 @@ func (z *Tokenizer) readTagAttrVal() { if z.err != nil { return } + if c == '/' { + // WHATWG 13.2.5.34 After attribute name state + // U+002F SOLIDUS (/) - Switch to the self-closing start tag state. + return + } if c != '=' { z.raw.end-- return |