properly encode url components