def url_fix(s, charset=None):
    """escapes special characters
    """
    if charset:
        warnings.warn("{}.url_fix() charset argument is deprecated".format(__name__), DeprecationWarning)

    scheme, netloc, path, querystring, fragment = urlsplit(s)
    path = quote(path, b'/%')
    querystring = quote_plus(querystring, b':&=')
    return urlunsplit((scheme, netloc, path, querystring, fragment))
def url_fix ( s , charset = None ) : if charset : warnings . warn ( "{}.url_fix() charset argument is deprecated" . format ( __name__ ) , DeprecationWarning ) scheme , netloc , path , querystring , fragment = urlsplit ( s ) path = quote ( path , b'/%' ) querystring = quote_plus ( querystring , b':&=' ) return urlunsplit ( ( scheme , netloc , path , querystring , fragment ) )
escapes special characters