Properly encode relevant parts of the URL to fix a Force Close