The docblocks for shorturl_shorten() and _shorturl_get_token() both say that "absolute and relative URLs are supported."

But it's clear that they are not supported:

function _shorturl_get_token($long_url) {
  
	$parsed_url = @parse_url($long_url);
	//-- we should not try to shorten URLs that are malformed or empty to begin with
	if (empty($parsed_url['host'])) {
		return NULL;
	}
...

Are you open to removing that check so that relative URLs are supported?

Comments

kentr’s picture

Issue summary: View changes
Status: Active » Closed (outdated)