decode uri component before redirect for safe redirect

Decoding URI component before redirecting will allow for redirection with all the get parameters along with the previous url. Currently, if a url with get parameter is redirected to, it results in a 404. 


@version101
I know you found it this way, but can we put this in a `var` to keep it leaking to the top-level?