---
title: 'CakePHP 1.2: $html->link with html or image'
url: 'https://maxwesten.nl/blog/articles/cakephp-12-html-link-with-html-or-image'
markdown: 'https://maxwesten.nl/blog/articles/cakephp-12-html-link-with-html-or-image.md'
date: '2007-04-02'
description: '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->li'
taxonomy:
  category:
    - PHP
  tag:
    - CakePHP
    - PHP
  archives_month:
    - apr_2007
  archives_year:
    - '2007'
---

# CakePHP 1.2: $html->link with html or image

[Home](https://maxwesten.nl/)  [Blog](https://maxwesten.nl/blog)  [Articles](https://maxwesten.nl/blog/articles)  CakePHP 1.2: $html->link with html or image 

## [ CakePHP 1.2: $html->link with html or image](https://maxwesten.nl/blog/articles/cakephp-12-html-link-with-html-or-image)

    2nd Apr 2007   [CakePHP](https://maxwesten.nl/tag:CakePHP#body-wrapper) [PHP](https://maxwesten.nl/tag:PHP#body-wrapper)  

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:

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

In CakePHP 1.2 you could rewrite this to:

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

 [ Previous Article](https://maxwesten.nl/blog/articles/i-want-to-be-six-again) [Next Article ](https://maxwesten.nl/blog/articles/cakephp-12-redirect-method)

#### Related Posts

- 100 

     [Mod\_security settings for Wordpress 3.x](https://maxwesten.nl/blog/articles/mod_security-settings-for-wordpress-3-x "Mod_security settings for Wordpress 3.x")
- 100 

     [Developing in PHP with NetBeans 6.8](https://maxwesten.nl/blog/articles/developing-in-php-with-netbeans "Developing in PHP with NetBeans 6.8")
- 100 

     [Installing xDebug 2.0.4 or 2.1 on OSX](https://maxwesten.nl/blog/articles/installing-xdebug-204-or-21-on-osx "Installing xDebug 2.0.4 or 2.1 on OSX")
- 100 

     [Installing PHP 5.2.8 on OSX Leopard 10.5.6](https://maxwesten.nl/blog/articles/installing-php-on-osx-leopard "Installing PHP 5.2.8 on OSX Leopard 10.5.6")
- 100 

     [CakePHP site redesign for 1.2 release ?? !!](https://maxwesten.nl/blog/articles/cakephp-site-redesign-for-12-release "CakePHP site redesign for 1.2 release ?? !!")

[←](https://xn--sr8hvo.ws/%F0%9F%92%95%F0%9F%8E%89%E2%A4%B5%EF%B8%8F/previous)An IndieWeb Webring 🕸💍 [→](https://xn--sr8hvo.ws/%F0%9F%92%95%F0%9F%8E%89%E2%A4%B5%EF%B8%8F/next)

---

## Navigation

- Parent: [Articles](https://maxwesten.nl/blog/articles.md)
- Previous: [CakePHP 1.2: redirect method](https://maxwesten.nl/blog/articles/cakephp-12-redirect-method.md)
- Next: [I want to be six again](https://maxwesten.nl/blog/articles/i-want-to-be-six-again.md)
