Michael Merickel
2018-10-15 0c29cf2df41600d3906d521c72991c7686018b71
src/pyramid/encode.py
@@ -4,15 +4,17 @@
    is_nonstr_iter,
    url_quote as _url_quote,
    url_quote_plus as _quote_plus,
    )
)
def url_quote(val, safe=''): # bw compat api
def url_quote(val, safe=''):  # bw compat api
    cls = val.__class__
    if cls is text_type:
        val = val.encode('utf-8')
    elif cls is not binary_type:
        val = str(val).encode('utf-8')
    return _url_quote(val, safe=safe)
# bw compat api (dnr)
def quote_plus(val, safe=''):
@@ -23,6 +25,7 @@
        val = str(val).encode('utf-8')
    return _quote_plus(val, safe=safe)
def urlencode(query, doseq=True, quote_via=quote_plus):
    """
    An alternate implementation of Python's stdlib