mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 23:21:29 +00:00 
			
		
		
		
	Be more permissive in what is accepted as an attribute name; this makes
this module slightly more resiliant in the face of XHTML input, or just colons in attribute names.
This commit is contained in:
		
							parent
							
								
									3eb78609c0
								
							
						
					
					
						commit
						8600b47b61
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -36,7 +36,7 @@
 | 
				
			||||||
commentclose = re.compile(r'--\s*>')
 | 
					commentclose = re.compile(r'--\s*>')
 | 
				
			||||||
tagfind = re.compile('[a-zA-Z][-_.a-zA-Z0-9]*')
 | 
					tagfind = re.compile('[a-zA-Z][-_.a-zA-Z0-9]*')
 | 
				
			||||||
attrfind = re.compile(
 | 
					attrfind = re.compile(
 | 
				
			||||||
    r'\s*([a-zA-Z_][-.a-zA-Z_0-9]*)(\s*=\s*'
 | 
					    r'\s*([a-zA-Z_][-:.a-zA-Z_0-9]*)(\s*=\s*'
 | 
				
			||||||
    r'(\'[^\']*\'|"[^"]*"|[-a-zA-Z0-9./:;+*%?!&$\(\)_#=~\'"]*))?')
 | 
					    r'(\'[^\']*\'|"[^"]*"|[-a-zA-Z0-9./:;+*%?!&$\(\)_#=~\'"]*))?')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
decldata = re.compile(r'[^>\'\"]+')
 | 
					decldata = re.compile(r'[^>\'\"]+')
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue