Skip to content

Url validator mishandles upper case and repeated hyphens. #27

Description

@scole-scea

I claim both of these should work:

Case-insensitivity in hostnames:

>>> validators.url('http://www.GOOGLE.com/')
ValidationFailure(func=url, args={'public': False, 'value': 'http://www.GOOGLE.com/'})

Ref: https://en.wikipedia.org/wiki/Hostname#Restrictions_on_valid_host_names

Multiple sequential hyphens:

>>> validators.url('http://xn--bcher-kva.ch/')
ValidationFailure(func=url, args={'public': False, 'value': 'http://xn--bcher-kva.ch/'})

Ref: https://en.wikipedia.org/wiki/Internationalized_domain_name#Example_of_IDNA_encoding

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue: Works not as designedoutdatedIssue/PR: Open for more than 3 months

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions