mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Fixes #6071
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8053 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
31cd461d22
commit
74bf622866
2 changed files with 24 additions and 3 deletions
|
@ -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) {
|
||||
|
|
|
@ -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)
|
||||
));
|
||||
|
|
Loading…
Add table
Reference in a new issue