I have a the following url:
http://www.test.com/?client=xyz&redirect_uri=http://www.xyz.com/x?p1=one&p2=two
How should I url encode these so that the browser does not interpret p1 and p2 as query strings of the test.com when they are actually part of the redirect_uri parameter.