Skip to content

Support for URLs without both http and www (just base domains) #22

Open
@hi2u

Description

@hi2u

The library detects "www.example.com", but not "example.com"

Obviously we're getting close to the area of false positives here, but I think this can be countered by using a whitelist of top-level domains...

http://data.iana.org/TLD/tlds-alpha-by-domain.txt

The options for how this could be implemented are:

  • Option1: Hardcode the latest whitelist into each release of Linkify
  • Option2: Have the user's application manage/source the whitelist of TLDs, then pass them into Linkify
  • Option3: Option1 baked in by default, with the option for Option2

Seeing this is a small library that doesn't need regular releases anyway, option Option1 might be overkill here. And Option2 allows us to ensure they we're always using an up-to-date whitelist.

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