diff --git a/cake/libs/view/helper.php b/cake/libs/view/helper.php index 9919b358a4d..1c4786646d7 100644 --- a/cake/libs/view/helper.php +++ b/cake/libs/view/helper.php @@ -175,7 +175,7 @@ function loadConfig($name = 'tags') { * @return string Full translated URL with base path. */ function url($url = null, $full = false) { - return Router::url($url, $full); + return Router::url($url, array('full' => $full, 'escape' => true)); } /** * Checks if a file exists when theme is used, if no file is found default location is returned diff --git a/cake/tests/cases/libs/view/helpers/html.test.php b/cake/tests/cases/libs/view/helpers/html.test.php index 46e2c7db9b4..5aa8587089a 100644 --- a/cake/tests/cases/libs/view/helpers/html.test.php +++ b/cake/tests/cases/libs/view/helpers/html.test.php @@ -148,6 +148,16 @@ function testLink() { '/a' ); $this->assertTags($result, $expected); + + $result = $this->Html->link('Original size', array( + 'controller' => 'images', 'action' => 'view', 3, '?' => array('height' => 100, 'width' => 200) + )); + $expected = array( + 'a' => array('href' => '/images/view/3?height=100&width=200'), + 'Original size', + '/a' + ); + $this->assertTags($result, $expected); Configure::write('Asset.timestamp', false);