diff --git a/View/Helper/NetCommonsHtmlHelper.php b/View/Helper/NetCommonsHtmlHelper.php index 041bd401..d4dc10cd 100644 --- a/View/Helper/NetCommonsHtmlHelper.php +++ b/View/Helper/NetCommonsHtmlHelper.php @@ -206,16 +206,14 @@ public function link($title = '', $url = null, $options = array()) { public function blockTitle($text = '', $titleIcon = null, $options = array()) { $output = ''; - if ($titleIcon) { - $text = $this->titleIcon($titleIcon) . ' ' . h($text); + $escape = Hash::get($options, 'escape', true); + if ($escape) { + $text = h($text); + } + $options = Hash::insert($options, 'escape', false); - $options = Hash::merge( - array('escape' => false), $options - ); - } else { - $options = Hash::merge( - array('escape' => true), $options - ); + if ($titleIcon) { + $text = $this->titleIcon($titleIcon) . ' ' . $text; } $output .= $this->Html->tag('h1', $text, $options);