jarednova/timber — pull request #302 by jnweaver (2014-07-22 22:18:40+00:00)
Title: Fix get_rel_url to handle subdomains

I have a site — parent.wisc.edu — with a custom menu item, apps.parent.wisc.edu/request.aspx

get_rel_url was converting this to a relative URL, /request.aspx

This fix passes subdomain URLs through get_rel_url untouched.

It also seems like get_rel_url should maybe use is_external but I did not do that. (Partly because is_external has the same issues with subdomain URLs. FWIW, I don't think the is_external test should assertFalse here: $this->assertFalse(TimberURLHelper::is_external($subdomain)); A subdomain URL should be considered an external URL, right?

Anyway, this PR fixes my issue. Hope it looks okay to you.

BTW, Travis reports all sorts of failed tests for me but I think (hope) that is specific to Travis?

Thanks!