Skip to content

Support ipv6 addresses in constructor string #113

@wanderview

Description

@wanderview

As pointed out in #110 its not possible to do new URLPattern("http://[::1]/"). Even if you properly escape the colons like new URLPattern("http://[\\:\\:1]/") it still throws.

Adding support for this turns out to not be too hard. The URL spec simply ignores colons inside [ ] brackets. We can do the same in URLPattern. Of course, for the hostname pattern to be valid the colon's will still need to be escaped.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions