Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Backups
youtube-dl
Commits
95f3f7c2
Unverified
Commit
95f3f7c2
authored
Aug 19, 2017
by
Yen Chi Hsuan
Browse files
[utils] Fix unescapeHTML for misformed string like "&a"" (#13935)
parent
f5469da9
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
1 deletion
+8
-1
ChangeLog
ChangeLog
+6
-0
test/test_utils.py
test/test_utils.py
+1
-0
youtube_dl/utils.py
youtube_dl/utils.py
+1
-1
No files found.
ChangeLog
View file @
95f3f7c2
version <unreleased>
Core
* [utils] Fix unescapeHTML for misformed string like "&a"" (#13935)
version 2017.08.18
Core
...
...
test/test_utils.py
View file @
95f3f7c2
...
...
@@ -279,6 +279,7 @@ class TestUtil(unittest.TestCase):
self
.
assertEqual
(
unescapeHTML
(
'/'
),
'/'
)
self
.
assertEqual
(
unescapeHTML
(
'é'
),
'é'
)
self
.
assertEqual
(
unescapeHTML
(
'�'
),
'�'
)
self
.
assertEqual
(
unescapeHTML
(
'&a"'
),
'&a"'
)
# HTML5 entities
self
.
assertEqual
(
unescapeHTML
(
'.''
),
'.
\'
'
)
...
...
youtube_dl/utils.py
View file @
95f3f7c2
...
...
@@ -596,7 +596,7 @@ def unescapeHTML(s):
assert
type
(
s
)
==
compat_str
return
re
.
sub
(
r
'&([^;]+;)'
,
lambda
m
:
_htmlentity_transform
(
m
.
group
(
1
)),
s
)
r
'&([^
&
;]+;)'
,
lambda
m
:
_htmlentity_transform
(
m
.
group
(
1
)),
s
)
def
get_subprocess_encoding
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment