Merge pull request #693 from dereuromark/2.2-html-link-fix

2.2 html link fix
This commit is contained in:
Mark Story 2012-06-12 11:54:12 -07:00
commit f467785a8c
2 changed files with 6 additions and 1 deletions

View file

@ -333,6 +333,10 @@ class HtmlHelperTest extends CakeTestCase {
'/a' '/a'
); );
$this->assertTags($result, $expected); $this->assertTags($result, $expected);
$result = $this->Html->link('http://www.example.org?param1=value1&param2=value2');
$expected = array('a' => array('href' => 'http://www.example.org?param1=value1&param2=value2'), 'http://www.example.org?param1=value1&param2=value2', '/a');
$this->assertTags($result, $expected);
} }
/** /**

View file

@ -335,7 +335,8 @@ class HtmlHelper extends AppHelper {
$url = $this->url($url); $url = $this->url($url);
} else { } else {
$url = $this->url($title); $url = $this->url($title);
$title = h(urldecode($url)); $title = htmlspecialchars_decode($url, ENT_QUOTES);
$title = h(urldecode($title));
$escapeTitle = false; $escapeTitle = false;
} }