Commit 39e73e8b by Gabriel

A note about percent_encode conformance.

parent 9fd634fa
......@@ -38,8 +38,13 @@ LangTagged = namedtuple('LangTagged', 'string langtag')
if PY3K:
percent_encode = quote
percent_decode = unquote
# XXX Both implementations allow stray %
def percent_encode(string, safe, encoding):
return quote(string, safe, encoding, errors='strict')
def percent_decode(string, encoding):
# unquote doesn't default to strict, fix that
return unquote(string, encoding, errors='strict')
else:
def percent_encode(string, **kwargs):
encoding = kwargs.pop('encoding')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment