Skip to content
This repository has been archived by the owner on Jan 23, 2018. It is now read-only.

URLs with certain TLDs and no protocol do not get turned into links #56

Open
alexchally opened this issue Oct 10, 2014 · 14 comments
Open
Labels

Comments

@alexchally
Copy link

Example: http://thewor.st/ gets linkified, but thewor.st does not. thewor.com behaves as expected.

@alexchally alexchally changed the title URLs with newer TLDs and no protocol do not get turned into links URLs with some TLDs and no protocol do not get turned into links Oct 10, 2014
@alexchally alexchally changed the title URLs with some TLDs and no protocol do not get turned into links URLs with certain TLDs and no protocol do not get turned into links Oct 10, 2014
@jasonrhodes
Copy link
Contributor

Reproducible here: http://requirebin.com/?gist=f19f3e2067cb3a553fea

I agree it's a thing that is happening, but I'm torn on if this is a bug or (ahem) a feature. Do we really want anything with a period in it to autolink, basically? Keeping up a known list of TLDs sounds annoying, too.

@tec27
Copy link
Member

tec27 commented Oct 10, 2014

Well, the idea of using twitter's linking library would be that they keep up with that list, not us. This is a bug that should be filed against them, anyway: https://github.com/twitter/twitter-text-js

@jasonrhodes
Copy link
Contributor

@tec27 totally agree in theory, except I have some serious doubts about whether anyone is actively maintaining that repo/library at this point. Seems kind of dead, and it's unclear whether twitter.com is using it (protocol-less URLs already link fine on Twitter, even though thewor.st does not) https://twitter.com/rhodesjason/status/520654180655312896

@junosuarez
Copy link

another problem is that Twitter is less likely to support .butts domains than meatspac might. I would like to at least start a conversation around supporting http://dotbutts.biz

@byronhulcher
Copy link
Contributor

ICANN provides a list at
http://data.iana.org/TLD/tlds-alpha-by-domain.txt (via https://www.icann.org/resources/pages/tlds-2012-02-25-en) we could download this when the server starts up? And then keep our own list for fun ones.
I also found a node package https://github.com/donpark/node-tld but I have no idea how that might integrate, I'm not too good smart with node.

@MylesBorins
Copy link
Member

@byronhulcher I don't think that module is the best idea, it hasn't been updated since 2013. We could potentially do something with loading the tlds from iana on boot

@junosuarez
Copy link

While I agree that that module appears to be out of date, the datasource it's using from mozilla ( http://mxr.mozilla.org/mozilla-central/source/netwerk/dns/effective_tld_names.dat ) is better than the one from IANA. The one from IANA is only actual top level domains. The Mozilla list is publicly registerable domains, eg .co.uk.

This totally makes sense to maintain as a separate module, if someone wants to take it on, but I would still also give a nod to us being able to additionally include.... ahem... other TLDs.

@junosuarez
Copy link

Also, Don Park is pretty easy to get ahold of on Twitter (he's in the bay area)

@junosuarez
Copy link

Is there any movement on this? I am willing to pick this up and work on it, lmk /cc @tec27 @kid-icarus @brycebaril

@MylesBorins
Copy link
Member

@jden I have not heard any rumbles of anyone working on this. You should definitely roll forward. Let me know if you need any help

@byronhulcher
Copy link
Contributor

Go for it! I was messing around with it with little to show. I don't have
experience writing node packages, you can probably move 10x faster.

On Friday, October 17, 2014, Myles Borins notifications@github.com wrote:

@jden https://github.com/jden I have not heard any rumbles of anyone
working on this. You should definitely roll forward. Let me know if you
need any help


Reply to this email directly or view it on GitHub
#56 (comment)
.

@tec27
Copy link
Member

tec27 commented Oct 17, 2014

I'm really not a fan of writing yet another link library. I can't tell you what to do with your time, but this isn't really a large win and transform.js from meatspac v1 was a real headache.

Also -1 on supporting .butts on meatspace; links that only work if you use a DNS proxy aren't really something this site needs.

@junosuarez
Copy link

Regardless of the size of the win, this has been a long-lived issue thread with many commenters, so even if it's a small feature, it's clearly something meatspacers want. It's also a regression from the first version of meatspace, so I think it's worth working on.

Sorry for mentioning .butts earlier in this thread - it's not in the scope of the PR that will close this thread

@kid-icarus
Copy link
Contributor

@jasonrhodes What makes you think the twitter lib isn't actively maintained? I see 16 open and 18 closed issues, which isn't too horrible, and it looks like the last release was back in August which isn't too bad.

If we encounter problems with the lib and our PRs aren't getting merged, we could always fork the twitter lib. I agree maintaining our own regex for this stuff in v1 was a pain, @tec27.

One thing I will say, is that the twitter lib is a 1300+ LOC, whereas https://github.com/meatspaces/meatspace-chat/blob/master/public/javascripts/base/transform.js is 232 LOC and we have more power to do things like the reddit links.

Perhaps just extending the lib would give us the same capability there.

As far as .butts go, I think having a vanity bookmarklet would be fun :)

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

No branches or pull requests

7 participants