#5751: Ampersand bug in $this->params['pass'] and $this->params['url']
-------------------------------+--------------------------------------------
Reporter: xbuzz | Owner:
Type: Bug | Status: reopened
Priority: High | Milestone:
Component: General | Version: RC3
Severity: Normal | Resolution:
Keywords: | Php_version: PHP 5
Cake_version: 1.2.0.7692 RC3 |
-------------------------------+--------------------------------------------
Changes (by xbuzz):
* status: closed => reopened
* resolution: invalid =>
Comment:
Nate, I understand that the string needs to be encoded. The problem is
that if you use urlencode() the ampersand loses it's encoding prior to
being handled by the application. Please take another look at this
example.
URL: http://localhost/test/view/This%20%26%20That/Other
{{{
class ExampleController extends AppController {
var $name = 'Example';
var $uses = array();
function view($category, $category2) {
//
http://shop.lycoz.com/example/view/This%20%26%20That/Other
pr($this->params);
die;
}
}
}}}
Output:
Note: $this->params['pass'] is broken and $this->params['url'] is broken.
{{{
Array
(
[pass] => Array
(
[0] => This
)
[named] => Array
(
)
[controller] => example
[action] => view
[plugin] =>
[form] => Array
(
)
[url] => Array
(
[url] => example/view/This
[That/Other] =>
)
)
}}}
Notice if you remove the ampersand (%26) it works fine.
Array
(
[pass] => Array
(
[0] => This and That
[1] => Other
)
[named] => Array
(
)
[controller] => example
[action] => view
[plugin] =>
[form] => Array
(
)
[url] => Array
(
[url] => example/view/This That/Other
)
)
--
Ticket URL: <https://trac.cakephp.org/ticket/5751#comment:3>
CakePHP : The Rapid Development Framework for PHP <https://trac.cakephp.org/>
Cake is a rapid development framework for PHP which uses commonly known design
patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC.
Our primary goal is to provide a structured framework that enables PHP users at
all levels to rapidly develop robust web applications, without any loss to
flexibility.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"tickets cakephp" 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/tickets-cakephp?hl=en
-~----------~----~----~----~------~----~------~--~---