php $_REQUEST data is only half-decoded
Posted
by hackmaster.a
on Stack Overflow
See other posts from Stack Overflow
or by hackmaster.a
Published on 2010-05-14T18:39:55Z
Indexed on
2010/05/14
18:44 UTC
Read the original article
Hit count: 248
I am retrieving a url via querystring. I need to pass it again to the next page. When I retrieve it the first time, using $_REQUEST['url']
, only the slashes are decoded, e.g:
http://example.com/search~S10?/Xllamas&searchscope=10&SORT=D/Xllamas&searchscope=10&SORT=D&SUBKEY=llamas/51%2C64%2C64%2CB/browse
The php docs page for urldecode advises against decoding request data, and says that it will already be decoded. I need it either completely decoded, so I can encode it again without double-encoding some parts, or not decoded at all.
I'm not sure why my experience of this data is incongruous with the php docs. Appreciate any help or pointers to same!!
© Stack Overflow or respective owner