Yeah, it looks like it's run through htmlentities for some reason. Can 
anyone confirm what the reason for that is?

// From lib/controller/sfWebController.class.php:

   public function redirect($url, $delay = 0, $statusCode = 302)
   {
     $response = $this->getContext()->getResponse();

     // redirect
     $response->clearHttpHeaders();
     $response->setStatusCode($statusCode);
     $response->setHttpHeader('Location', $url);
     $response->setContent(sprintf('<html><head><meta 
http-equiv="refresh" content="%d;url=%s"/></head></html>', $delay, 
htmlentities($url, ENT_QUOTES, sfConfig::get('sf_charset'))));

     if (!sfConfig::get('sf_test'))
     {
       $response->sendHttpHeaders();
     }
     $response->sendContent();
   }


Michael Smith wrote:
> The latest svn. I did an update right before reporting the issue just
> in case it was already fixed. I'm pretty sure I have done this in the
> past without issue.
> 
> On Feb 25, 11:14 am, Tom Haskins-Vaughan <[email protected]>
> wrote:
>> Yeah, that is weird. What version of symfony are you running?
>>
>>
>>
>> Michael Smith wrote:
>>> Yes
>>> On Feb 25, 11:01 am, Tom Haskins-Vaughan <[email protected]>
>>> wrote:
>>>> Is date_from available?
>>>> Michael Smith wrote:
>>>>> It redirects to the page but date_to does not appear in the request
>>>>> parameters of the page unless I decode the special chars before
>>>>> redirecting.
>>>>> On Feb 25, 10:49 am, Tom Haskins-Vaughan <[email protected]>
>>>>> wrote:
>>>>>> I'm assuming (can someone confirm?) that it's because & is not allowed
>>>>>> in XHTML documents. Are your links working or are they broken?
>>>>>> Tom
>>>>>> Michael Smith wrote:
>>>>>>> If I use (in an action) $this->redirect('history/index?
>>>>>>> date_from=auto&date_to=auto') it will escape the ampersand and the url
>>>>>>> will be /summary.html?date_from=auto&amp;date_to=auto. A work around
>>>>>>> is $this->redirect(htmlspecialchars_decode($this->generateUrl
>>>>>>> ('history_summary', array('date_from' => 'auto', 'date_to' =>
>>>>>>> 'auto')))) but doesn't seem like best practices. Any ideas what is
>>>>>>> causing this?
>>>>>>> Thanks,
>>>>>>> Michael
>>>>>> --
>>>>>> Tom Haskins-Vaughan
>>>>>> Temple Street Media: Design and Development for the Web
>>>>>> [email protected] |www.templestreetmedia.com
>>>> --
>>>> Tom Haskins-Vaughan
>>>> Temple Street Media: Design and Development for the Web
>>>> [email protected] |www.templestreetmedia.com
>> --
>> Tom Haskins-Vaughan
>> Temple Street Media: Design and Development for the Web
>> [email protected] |www.templestreetmedia.com
> > 
> 

-- 
Tom Haskins-Vaughan
Temple Street Media: Design and Development for the Web
[email protected] | www.templestreetmedia.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to