CakePHP HTML Helper: Is Image Within Link Escaping?

Upgrading from Cake 1.2 to 1.3 and I have an image nested within a link element, both generated by an HTML helper. However, nested image markup is escaped from <

to &gt;

. I know the HTML helper is now escaping by default, but I can't get it to change that behavior.

This is the code to link to the example image:

$html->link($html->image('icons/small/navigation-back.gif', array('alt'=>"Move Left", 'border'=>"0"))
,'#',array('id'=>'options_left'), array('escape'=>false))

      

I added a bit array('escape'=>false)

from the official Cake documentation (part of the $ options array), but I still get escaped image tags. Is the order wrong or has it changed more than I know? Source code straight from cake 1.2.

+2


source to share


1 answer


the third parameter is an array of options:



$html->link($html->image('icons/small/navigation-back.gif', array('alt'=>"Move Left", 'border'=>"0"))
,'#',array('id'=>'options_left', 'escape'=>false))

      

+7


source







All Articles