mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-03-17 06:59:51 +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;
|
$escapeTitle = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($htmlAttributes['escape'])) {
|
if (isset($htmlAttributes['escape']) && $escapeTitle == true) {
|
||||||
$escapeTitle = $htmlAttributes['escape'];
|
$escapeTitle = $htmlAttributes['escape'];
|
||||||
unset($htmlAttributes['escape']);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($escapeTitle === true) {
|
if ($escapeTitle === true) {
|
||||||
|
|
|
@ -149,6 +149,28 @@ class HtmlHelperTest extends CakeTestCase {
|
||||||
);
|
);
|
||||||
$this->assertTags($result, $expected);
|
$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(
|
$result = $this->Html->link('Original size', array(
|
||||||
'controller' => 'images', 'action' => 'view', 3, '?' => array('height' => 100, 'width' => 200)
|
'controller' => 'images', 'action' => 'view', 3, '?' => array('height' => 100, 'width' => 200)
|
||||||
));
|
));
|
||||||
|
|
Loading…
Add table
Reference in a new issue