mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-10-30 22:25:19 +00:00 
			
		
		
		
	[utils] Strip double spaces in clean_html
				
					
				
			Closes #2497 Authored by: dirkf
This commit is contained in:
		| @@ -639,10 +639,9 @@ def clean_html(html): | ||||
|     if html is None:  # Convenience for sanitizing descriptions etc. | ||||
|         return html | ||||
|  | ||||
|     # Newline vs <br /> | ||||
|     html = html.replace('\n', ' ') | ||||
|     html = re.sub(r'(?u)\s*<\s*br\s*/?\s*>\s*', '\n', html) | ||||
|     html = re.sub(r'(?u)<\s*/\s*p\s*>\s*<\s*p[^>]*>', '\n', html) | ||||
|     html = re.sub(r'\s+', ' ', html) | ||||
|     html = re.sub(r'(?u)\s?<\s?br\s?/?\s?>\s?', '\n', html) | ||||
|     html = re.sub(r'(?u)<\s?/\s?p\s?>\s?<\s?p[^>]*>', '\n', html) | ||||
|     # Strip html tags | ||||
|     html = re.sub('<.*?>', '', html) | ||||
|     # Replace html entities | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 pukkandan
					pukkandan