3 ms·
It shortens an https:// https:// link to http:// http://, and it also shortens invalid links. Trying to add a js alert I noticed the preview allows arbitrary h
by krapp 12y ago
It shortens an https:// https:// link to http:// http://, and it also shortens invalid links.
Trying to add a js alert I noticed the preview allows arbitrary html to display, but the end result was useless - http://xiv.in/ZW4NL http://xiv.in/ZW4NL and trying different schemes caused http to be prepended to the url by default.
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.
- critiq 12y agoThank you, will check and fix it.