mirror of
https://github.com/python/cpython.git
synced 2025-08-28 20:56:54 +00:00
Fix an oversight in r83294. unquote() should reject bytes. Issue #9301.
This commit is contained in:
parent
62069d3ce7
commit
c049fca0da
2 changed files with 2 additions and 1 deletions
|
@ -338,7 +338,7 @@ def unquote(string, encoding='utf-8', errors='replace'):
|
|||
|
||||
unquote('abc%20def') -> 'abc def'.
|
||||
"""
|
||||
if string in (b'', ''):
|
||||
if string == '':
|
||||
return string
|
||||
res = string.split('%')
|
||||
if len(res) == 1:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue