discovery/django-bitly — pull request #5 by mkoistinen (2013-05-30 15:23:55+00:00)
Title: Fix for complete URLs and additions to handle more cases of complete URLs

This started as a fix for when passed strings were already complete URLs, as is the case when you pass: request.build_absolute_uri in a template. Prior to this fix, the resulting shortened URL would be malformed:

input: http://domain.com/resource/
output: http://domain.comhttp/domain.com/resource/

Works fine now. Also, added support to properly detect complete URLs for schemes that use zero or one forward slash too. such as mailto: or tel: or bitcoin:

BTW, nicely designed code. It was easy to jump into and the whole stringholder thing is nice.

Signed-off-by: Martin Koistinen