Remove trailing whitespace in URL