git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8053 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
the_undefined 2009-02-23 15:19:33 +00:00
parent 31cd461d22
commit 74bf622866
2 changed files with 24 additions and 3 deletions

View file

@ -285,9 +285,8 @@ class HtmlHelper extends AppHelper {
$escapeTitle = false;
}
if (isset($htmlAttributes['escape'])) {
if (isset($htmlAttributes['escape']) && $escapeTitle == true) {
$escapeTitle = $htmlAttributes['escape'];
unset($htmlAttributes['escape']);
}
if ($escapeTitle === true) {

View file

@ -148,7 +148,29 @@ class HtmlHelperTest extends CakeTestCase {
'/a'
);
$this->assertTags($result, $expected);
$result = $this->Html->link('Next >', '#', array(
'title' => 'to escape … or not escape?',
'escape' => false
));
$expected = array(
'a' => array('href' => '#', 'title' => 'to escape … or not escape?'),
'Next >',
'/a'
);
$this->assertTags($result, $expected);
$result = $this->Html->link('Next >', '#', array(
'title' => 'to escape … or not escape?',
'escape' => true
), false, false);
$expected = array(
'a' => array('href' => '#', 'title' => 'to escape … or not escape?'),
'Next >',
'/a'
);
$this->assertTags($result, $expected);
$result = $this->Html->link('Original size', array(
'controller' => 'images', 'action' => 'view', 3, '?' => array('height' => 100, 'width' => 200)
));