mirror of
				https://github.com/yattee/yattee.git
				synced 2025-10-31 20:52:04 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			15 lines
		
	
	
		
			404 B
		
	
	
	
		
			Swift
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			404 B
		
	
	
	
		
			Swift
		
	
	
	
	
	
| import Foundation
 | |
| 
 | |
| extension String {
 | |
|     var replacingHTMLEntities: String {
 | |
|         do {
 | |
|             return try NSAttributedString(data: Data(utf8), options: [
 | |
|                 .documentType: NSAttributedString.DocumentType.html,
 | |
|                 .characterEncoding: String.Encoding.utf8.rawValue
 | |
|             ], documentAttributes: nil).string
 | |
|         } catch {
 | |
|             return self
 | |
|         }
 | |
|     }
 | |
| }
 | 
