def is_safe_url(target):
    ref_url = urlparse(request.host_url)
    test_url = urlparse(urljoin(request.host_url, target))
    return (('http', 'https') in test_url.scheme and
            ref_url.netloc == test_url.netloc)
dataset/ETHPy150Open mrjoes/flask-admin/flask_admin/helpers.py/is_safe_url/swapped operands of `in`