RFC 2396 sec 2.2 states that you must URL-code these characters anywhere where they are not used for their explicit meanings; those. you should always targetUrl + '?next=' + urlencode(nextURL) .
The web browser does not "decode" these parameters at all; the browser knows nothing about the parameters, but simply passes along the line. The request line of the form http://www.example.com/path/to/query?param1=value¶m2=value2 requested by the GET browser as:
GET /path/to/query?param1=value¶m2=value2 HTTP/1.1 Host: www.example.com (other headers follow)
On the backend you will need to analyze the results. I think the PHP $_REQUEST has already done this for you; in other languages do you want to break the first character ? , then divide by & characters, then divide by the first character = , then urldecode and the name and value.
source share