From 2da2922b002eb4ca4b2da51ce2f81588554b485c Mon Sep 17 00:00:00 2001 From: Hynek Jemelik Date: Wed, 21 Oct 2015 10:13:24 +0200 Subject: [PATCH] fix regex in utils to avoid breaking json structure --- youtube_dl/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index a61e47646..79a411046 100644 --- a/youtube_dl/utils.py +++ b/youtube_dl/utils.py @@ -260,7 +260,7 @@ def clean_html(html): html = re.sub(r'\s*<\s*br\s*/?\s*>\s*', '\n', html) html = re.sub(r'<\s*/\s*p\s*>\s*<\s*p[^>]*>', '\n', html) # Strip html tags - html = re.sub('<.*?>', '', html) + html = re.sub('<[^"]*>', '', html) # Replace html entities html = unescapeHTML(html) return html.strip()