Skip to content

Mention just how loose this component is #4

@dandv

Description

@dandv
var matcher = /^\w+:\/\/([^\s\.]+\.\S{2}|localhost[\:?\d]*)\S*$/;

Will fail SO badly in so many cases: IDNs, modern TLDs, parens in URLs, punctuation at the end etc.

There's a much more powerful regexp in component/regexps.uri.

I understand this component doesn't really aim to properly parse URLs like linkify, but perhaps it's better to just use the regexps component.

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