The parameter is not canceled. You will see the url:
http://stackoverflow.com/users/login?returnurl=%2fquestions%2fask
really works - SO reads and cancels this parameter as usual. If you want to include other characters outside the bounds, such as the '&' in the parameter, you still have to avoid them.
The trick is that the "/" character, in particular, does not have to be% -shielded in the query parameters. It must be escaped in other contexts, for example, in part of the path, so URLEncode always encodes it to be safe.
If you just want the URL to look prettier, just avoid the parameter as usual (which you should do to avoid all other characters that need to be processed correctly), and then replace the string with "% 2f" with "% 2f" , / '.
bobince
source share