示例#1
0
文件: encode.py 项目: JDeuce/pyramid
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)
示例#2
0
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)
示例#3
0
文件: encode.py 项目: AdamG/pyramid
def url_quote(s, safe=''): # bw compat api
    return _url_quote(s, safe=safe)
示例#4
0
def url_quote(s, safe=''): # bw compat api
    return _url_quote(s, safe=safe)