mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	#2927: Added the unescape() function to the html module.
This commit is contained in:
		
							parent
							
								
									5160da1afc
								
							
						
					
					
						commit
						4a9ee26750
					
				
					 7 changed files with 215 additions and 49 deletions
				
			
		|  | @ -569,18 +569,6 @@ def test_EOF_in_charref(self): | |||
|         for html, expected in data: | ||||
|             self._run_check(html, expected) | ||||
| 
 | ||||
|     def test_unescape_function(self): | ||||
|         p = self.get_collector() | ||||
|         self.assertEqual(p.unescape('&#bad;'),'&#bad;') | ||||
|         self.assertEqual(p.unescape('&'),'&') | ||||
|         # see #12888 | ||||
|         self.assertEqual(p.unescape('{ ' * 1050), '{ ' * 1050) | ||||
|         # see #15156 | ||||
|         self.assertEqual(p.unescape('ÉricÉric' | ||||
|                                     '&alphacentauriαcentauri'), | ||||
|                                     'ÉricÉric&alphacentauriαcentauri') | ||||
|         self.assertEqual(p.unescape('&co;'), '&co;') | ||||
| 
 | ||||
|     def test_broken_comments(self): | ||||
|         html = ('<! not really a comment >' | ||||
|                 '<! not a comment either -->' | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Ezio Melotti
						Ezio Melotti