Skip to content

Commit

Permalink
escapeTitle should be set to false while generating images as a link.
Browse files Browse the repository at this point in the history
  • Loading branch information
redd committed Jun 27, 2014
1 parent 065fe88 commit eb345b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions View/Helper/MenuBuilderHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,8 @@ protected function _buildItem(&$item, $pos = -1, &$isActive = false) {
}

if (!empty($item['image'])) {
$urlOptions['escape'] = false;
$labelTitle = (isset($urlOptions['escapeTitle']) && $urlOptions['escapeTitle']) ? h($item['title']) : $item['title'];
$urlOptions['escapeTitle'] = false;
$labelTitle = (isset($urlOptions['escape']) && $urlOptions['escape']) ? h($item['title']) : $item['title'];
$url = $this->Html->link($this->Html->image($item['image'], array('alt' => $item['title'])) . '<span class="label">' . $labelTitle . '</span>', $item['url'], $urlOptions);
} else {
$url = $this->Html->link($item['title'], $item['url'], $urlOptions);
Expand Down

0 comments on commit eb345b0

Please sign in to comment.