Skip to content

Commit

Permalink
Merge pull request #693 from dereuromark/2.2-html-link-fix
Browse files Browse the repository at this point in the history
2.2 html link fix
  • Loading branch information
markstory committed Jun 12, 2012
2 parents 5f0e096 + ba62ecd commit f467785
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php
Expand Up @@ -333,6 +333,10 @@ public function testLink() {
'/a'
);
$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);
}

/**
Expand Down
3 changes: 2 additions & 1 deletion lib/Cake/View/Helper/HtmlHelper.php
Expand Up @@ -335,7 +335,8 @@ public function link($title, $url = null, $options = array(), $confirmMessage =
$url = $this->url($url);
} else {
$url = $this->url($title);
$title = h(urldecode($url));
$title = htmlspecialchars_decode($url, ENT_QUOTES);
$title = h(urldecode($title));
$escapeTitle = false;
}

Expand Down

0 comments on commit f467785

Please sign in to comment.