whitespace trimmed for is_url() and fixed return bug