def check_url(form, field):
    """Check url schema."""
    url = field.data.strip()
    if not url:
        return
    result = urlparse(url)
    if result.scheme == "":
        field.data = "http://%s" % re.sub(r'^:?/*', '', url)
dataset/ETHPy150Open Akagi201/learning-python/flask/flask-boost/test/application/forms/_helper.py/check_url/original