I am generating a thumbnail of an image and I want to use the thumbnail as a link. I have the following code
$img = $thumbnail->show($options, $tag_options);
echo $this->Html->image("thumbs/".$img);
echo $this->Html->link($this->Html->image("thumbs/".$img),array('controller'=>'images', 'action'=>'view', $image['Image']['id']));
The first echo statement works correctly and displays the image. the second one displays a link that looks like this
<img src="/app/webroot/img/thumbs/fa741043357d4bf1ca39a58edf351d2a.JPG" alt="" />
now the link works correctly in the sense that it takes to the view page for that image, but it is not displaying the image as I would expect it to. when I view page source the link looks like this:
<a href="/index.php/images/view/9"><img src="/app/webroot/img/thumbs/fa741043357d4bf1ca39a58edf351d2a.JPG" alt="" /></a>
I noticed that the angle brackets on the img tag are escaped. What am I doing wrong?