mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-26 16:07:54 +00:00 
			
		
		
		
	Update x/net (#5169)
This commit is contained in:
		
				
					committed by
					
						 techknowlogick
						techknowlogick
					
				
			
			
				
	
			
			
			
						parent
						
							f887085ee0
						
					
				
				
					commit
					2af57c7820
				
			
							
								
								
									
										16
									
								
								vendor/golang.org/x/net/html/const.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										16
									
								
								vendor/golang.org/x/net/html/const.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -4,7 +4,7 @@ | ||||
|  | ||||
| package html | ||||
|  | ||||
| // Section 12.2.3.2 of the HTML5 specification says "The following elements | ||||
| // Section 12.2.4.2 of the HTML5 specification says "The following elements | ||||
| // have varying levels of special parsing rules". | ||||
| // https://html.spec.whatwg.org/multipage/syntax.html#the-stack-of-open-elements | ||||
| var isSpecialElementMap = map[string]bool{ | ||||
| @@ -52,10 +52,12 @@ var isSpecialElementMap = map[string]bool{ | ||||
| 	"iframe":     true, | ||||
| 	"img":        true, | ||||
| 	"input":      true, | ||||
| 	"isindex":    true, | ||||
| 	"isindex":    true, // The 'isindex' element has been removed, but keep it for backwards compatibility. | ||||
| 	"keygen":     true, | ||||
| 	"li":         true, | ||||
| 	"link":       true, | ||||
| 	"listing":    true, | ||||
| 	"main":       true, | ||||
| 	"marquee":    true, | ||||
| 	"menu":       true, | ||||
| 	"meta":       true, | ||||
| @@ -95,8 +97,16 @@ func isSpecialElement(element *Node) bool { | ||||
| 	switch element.Namespace { | ||||
| 	case "", "html": | ||||
| 		return isSpecialElementMap[element.Data] | ||||
| 	case "math": | ||||
| 		switch element.Data { | ||||
| 		case "mi", "mo", "mn", "ms", "mtext", "annotation-xml": | ||||
| 			return true | ||||
| 		} | ||||
| 	case "svg": | ||||
| 		return element.Data == "foreignObject" | ||||
| 		switch element.Data { | ||||
| 		case "foreignObject", "desc", "title": | ||||
| 			return true | ||||
| 		} | ||||
| 	} | ||||
| 	return false | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user