#622: WebRouting::gen() encodes parameters not in route twice
-----------------------------------------------------------+----------------
 Reporter:  Felix Gilcher <[EMAIL PROTECTED]  |       Owner:  david             
             
     Type:  defect                                         |      Status:  new  
                          
 Priority:  normal                                         |   Milestone:  
0.11.1                         
Component:  _OTHER_                                        |     Version:  HEAD 
                          
 Severity:  normal                                         |    Keywords:  
Routing double encode urlencode
-----------------------------------------------------------+----------------
 When generating a route, parameters not found in the route are appended as
 get parameters. However, these parameters will be encoded twice - once in
 WebRouting, line 290 with rawurlencode and later on a second time when
 they get passed to http_build_query() which does the encoding implicitly.
 A quick fix would be to decode the remaining params before passing them,
 inserting something like in line 303

  $p = array_map('rawurldecode', array_filter($p, array('AgaviToolkit',
 'isNotArray')));

 but this seems like a waste of CPU cycles to me (it does solve the problem
 however).

 A small testcase is appended, it needs the following route:

     <route name="urlencodebug" pattern="^/urlencodebug"
 module="UrlEncodeBug" action="Index" />

-- 
Ticket URL: <http://trac.agavi.org/ticket/622>
Agavi <http://www.agavi.org/>
An MVC Framework for PHP5


_______________________________________________
Agavi Tickets Mailing List
[email protected]
http://lists.agavi.org/mailman/listinfo/tickets

Reply via email to