def _clean_link(url):
    '\n    Make sure a link is fully quoted.\n    For example, if \' \' occurs in the URL, it will be replaced with "%20",\n    and without double-quoting other characters.\n    '
    result = urllib_parse.urlparse(url)
    is_local_path = (not result.netloc)
    path = _clean_url_path(result.path, is_local_path=is_local_path)
    return urllib_parse.urlunparse(result._replace(path=path))
Make sure a link is fully quoted.
For example, if ' ' occurs in the URL, it will be replaced with "%20",
and without double-quoting other characters.
def _clean_link(url):
    '\n    Make sure a link is fully quoted.\n    For example, if \' \' occurs in the URL, it will be replaced with "%20",\n    and without double-quoting other characters.\n    '
    result = urllib_parse.urlparse(url)
    is_local_path = (not result.netloc)
    path = _clean_url_path(result.path, is_local_path=is_local_path)
    return urllib_parse.urlunparse(result._replace(path=path))