twitter/twitter-text-js — Issue #20: Library does not detect valid CCTLD's in extractUrl method
Author: tommoor
Created: 2011-11-15 00:52:51+00:00
State: open

I am trying to use this library to build a prevalidator for tweets before they are sent to twitter.com however it does not pick up URL's such as bit.ly/12345 as being valid URLs. However, the twitter API does wrap these non-http cctld URLs, producing a longer tweet that is then rejected.

I believe this bug is actually apparent on the twitter website and can be reproduced by filling the tweet box with upto 140 characters and including a bit.ly link without http. It will be impossible to send the tweet.