magento _redirect with parameters that have + or /

Posted by epeleg on Stack Overflow See other posts from Stack Overflow or by epeleg
Published on 2010-12-27T11:44:03Z Indexed on 2010/12/27 11:53 UTC
Read the original article Hit count: 256

Filed under:
|

seems like a call to

$this->_redirect('*/*/myaction',$myargs);

does not properly escape the arguments so if

$myargs=array(p1=>'string that has + or / within it')

the created URL will be something like:

 ..../myaction/?p1/string%20that%20has%20+%20or%20/%20within%20it

causing the getParams collection on the action to have p1 with value 'string that has or ' <- plus sign missing and value broken and ' within it' with no value or something similar.

is there any standard way I should handle the arguments before passing them to _redirect ?

Eyal

© Stack Overflow or respective owner

Related posts about magento

Related posts about url-encoding