mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	Do not assume that types.UnicodeType exists; we might be running in an old
version of Python. ;-(
This commit is contained in:
		
							parent
							
								
									1402ab2cb9
								
							
						
					
					
						commit
						95b4ec5fbe
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		|  | @ -7,7 +7,11 @@ | |||
| import handler | ||||
| import xmlreader | ||||
| 
 | ||||
| try: | ||||
|     _StringTypes = [types.StringType, types.UnicodeType] | ||||
| except AttributeError: | ||||
|     _StringTypes = [types.StringType] | ||||
| 
 | ||||
| 
 | ||||
| def escape(data, entities={}): | ||||
|     """Escape &, <, and > in a string of data. | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Fred Drake
						Fred Drake