aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2017-04-29 15:58:45 +0800
committerGitHub <noreply@github.com>2017-04-29 15:58:45 +0800
commitd19093bd50a0123b7d00c263b012d6d391814970 (patch)
treebeeff14a9499d3a31dedd33cb12e35ec99f5bef9 /youtube_dl
parent24eb7c257807aceef713f6d01824cf600a9d6232 (diff)
parent9222d945107411ba657dab965fab63de8e8781b9 (diff)
downloadyoutube-dl-d19093bd50a0123b7d00c263b012d6d391814970.tar.xz
Merge pull request #12906 from Tithen-Firion/clean-html-fix
[utils] Fix inconsistent output of clean_html
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py
index 91e235ff2..41bc20544 100644
--- a/youtube_dl/utils.py
+++ b/youtube_dl/utils.py
@@ -421,8 +421,8 @@ def clean_html(html):
# Newline vs <br />
html = html.replace('\n', ' ')
- 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)
+ 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