In CakePHP 1.1 if you need to display an image or piece of HTML with a link to an action, you need to instruct cake NOT to escape the contents of the "Title" attribute with the last false statement like this:

e(
$html->link( 
    $html->image("add.gif"), 
    array('action' => 'add'), 
    array(), 
    null, 
    false ));

In CakePHP 1.2 you could rewrite this to:

e(
$html->link( 
    $html->image("add.gif"), 
    array('action' => 'add'), 
    array('escape' => false)));

Previous Article Next Article