Issue
echo $this->Html->link(
'<span class="glyphicon glyphicon-remove"></span> Cancel',
array(
'action'=>'index',
'page:'.$this->request->data['Transaction']['page']
),
array(
'class'=>'btn btn-default',
'escape'=>false
),
'Do you want to cancel ?'
);
Solution
Because your label is HTML rather than plain text.
You don't want to insert a literal <span class="glyphicon glyphicon-remove"></span>
text, you want an HTML tag to display an icon.
// lib/Cake/View/Helper/HtmlHelper.php
if (isset($options['escapeTitle'])) {
$escapeTitle = $options['escapeTitle'];
unset($options['escapeTitle']);
} elseif (isset($options['escape'])) {
$escapeTitle = $options['escape'];
}
if ($escapeTitle === true) {
$title = h($title);
} elseif (is_string($escapeTitle)) {
$title = htmlentities($title, ENT_QUOTES, $escapeTitle);
}
Answered By - Álvaro González Answer Checked By - Dawn Plyler (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.