Commit 39e73e8b by Gabriel

A note about percent_encode conformance.

parent 9fd634fa
...@@ -38,8 +38,13 @@ LangTagged = namedtuple('LangTagged', 'string langtag') ...@@ -38,8 +38,13 @@ LangTagged = namedtuple('LangTagged', 'string langtag')
if PY3K: if PY3K:
percent_encode = quote # XXX Both implementations allow stray %
percent_decode = unquote 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: else:
def percent_encode(string, **kwargs): def percent_encode(string, **kwargs):
encoding = kwargs.pop('encoding') 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