def is_safe_url(url, host=None):
    if not url:
        return False
    netloc = urlparse.urlparse(url)[1]
    return not netloc or netloc == host


# DEPRECATED -- Mitaka
# This method definition is included to prevent breaking backward compatibility
# The original functionality was problematic and has been removed.
Return ``True`` if the url is a safe redirection.
dataset/ETHPy150Open openstack/django_openstack_auth/openstack_auth/utils.py/is_safe_url