Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
hi2u opened this issue Feb 21, 2017 · 3 comments
Open

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

hi2u opened this issue Feb 21, 2017 · 3 comments

Comments

@hi2u
Copy link

hi2u commented Feb 21, 2017

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.

@hi2u hi2u changed the title Support for http/www-less URLs (just base domains) Support for http+www-less URLs (just base domains) Feb 21, 2017
@hi2u hi2u changed the title Support for http+www-less URLs (just base domains) Support for URLs without both http and www (just base domains) Feb 21, 2017
@kolinko-ant
Copy link

+1

2 similar comments
@Yahav
Copy link

Yahav commented Apr 7, 2018

+1

@nathan005
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants