generate a properly encoded url
(fixes navigation on OS X, possibly on other platforms)