It shortens an <a href="https://" rel="nofollow">https://</a> link to <a href="http://" rel="nofollow">http://</a>, and it also shortens invalid links.<p>Trying to add a js alert I noticed the preview allows arbitrary html to display, but the end result was useless - <a href="http://xiv.in/ZW4NL" rel="nofollow">http://xiv.in/ZW4NL</a> and trying different schemes caused http to be prepended to the url by default.<p>I would suggest trying to validate the urls, and at least attempting to connect and get a response once before hashing them. This will at least result in less junk in your database (or wherever you're storing them) if you dump invalid links altogether.