mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-30 19:02:24 -05:00 
			
		
		
		
	[chore] bump golang.org/x/net@v0.38.0, github.com/gin-contrib/cors@v1.7.4, github.com/spf13/viper@v1.20.1, github.com/tdewolff/minify/v2@v2.22.4 (#3959)
This commit is contained in:
		
					parent
					
						
							
								fdf23a91de
							
						
					
				
			
			
				commit
				
					
						b0873972ec
					
				
			
		
					 18 changed files with 734 additions and 681 deletions
				
			
		
							
								
								
									
										18
									
								
								vendor/golang.org/x/net/html/token.go
									
										
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										18
									
								
								vendor/golang.org/x/net/html/token.go
									
										
									
										generated
									
									
										vendored
									
									
								
							|  | @ -839,8 +839,22 @@ func (z *Tokenizer) readStartTag() TokenType { | |||
| 	if raw { | ||||
| 		z.rawTag = strings.ToLower(string(z.buf[z.data.start:z.data.end])) | ||||
| 	} | ||||
| 	// Look for a self-closing token like "<br/>". | ||||
| 	if z.err == nil && z.buf[z.raw.end-2] == '/' { | ||||
| 	// Look for a self-closing token (e.g. <br/>). | ||||
| 	// | ||||
| 	// Originally, we did this by just checking that the last character of the | ||||
| 	// tag (ignoring the closing bracket) was a solidus (/) character, but this | ||||
| 	// is not always accurate. | ||||
| 	// | ||||
| 	// We need to be careful that we don't misinterpret a non-self-closing tag | ||||
| 	// as self-closing, as can happen if the tag contains unquoted attribute | ||||
| 	// values (i.e. <p a=/>). | ||||
| 	// | ||||
| 	// To avoid this, we check that the last non-bracket character of the tag | ||||
| 	// (z.raw.end-2) isn't the same character as the last non-quote character of | ||||
| 	// the last attribute of the tag (z.pendingAttr[1].end-1), if the tag has | ||||
| 	// attributes. | ||||
| 	nAttrs := len(z.attr) | ||||
| 	if z.err == nil && z.buf[z.raw.end-2] == '/' && (nAttrs == 0 || z.raw.end-2 != z.attr[nAttrs-1][1].end-1) { | ||||
| 		return SelfClosingTagToken | ||||
| 	} | ||||
| 	return StartTagToken | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue