do a couple simple conversions of htmlified characters to their ascii equivalent
This commit is contained in:
		
							parent
							
								
									8fba54e33d
								
							
						
					
					
						commit
						3bd8fb13c2
					
				| @ -180,6 +180,12 @@ class GoogleTranslate(Module): | |||||||
|             translation = content[start_idx:] |             translation = content[start_idx:] | ||||||
|             end_idx = translation.find('"}, "') |             end_idx = translation.find('"}, "') | ||||||
|             translation = translation[:end_idx] |             translation = translation[:end_idx] | ||||||
|  | 
 | ||||||
|  |             # do some text conversion | ||||||
|  |             translation = translation.replace('\\u0026quot;', '"') | ||||||
|  |             translation = translation.replace('\\u003c', '<') | ||||||
|  |             translation = translation.replace('\\u003e', '>') | ||||||
|  | 
 | ||||||
|             if replypath is None: |             if replypath is None: | ||||||
|                 return translation |                 return translation | ||||||
|             else: |             else: | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user