Skip to content

URL matcher doesn't recognize new national TLDs like .рф #200

@tsx

Description

@tsx

Autolinker doesn't recognize valid urls like http://россия.рф or their punicode equivalent http://xn--d1acufc.xn--p1ai.

(GitHub doesn't get Cyrillic one either 😐)

It seems like a list of common TLDs is used in https://github.com/gregjacobs/Autolinker.js/blob/1.4.1/src/RegexLib.js#L57

I'd suggest either using a permissive alphanumeric unicode regex like /[-\w]{2,63}/u or importing the official list in its entirety, and also providing unicode equivalents to punicode TLDs like xn--...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions