<?php
# Copyright © 2012 Martin Ueding <dev@martin-ueding.de>

class BookmarkHelper extends AppHelper {
	var $helpers = array('Html');

	function print_bookmark($that, $bookmark) {
		if (Configure::read('favicon.show')) {
			echo '<img width="16" height="16" src="data:image/ico;base64,'
				.$this->requestAction('/bookmarks/favicon/'.$bookmark['id'])
				.'" />';
			echo ' ';
		}

		echo $that->Html->link($bookmark['title'],
			array('controller' => 'bookmarks', 'action' => 'visit', $bookmark['id']),
			array('class' => 'bookmark_link', 'title' => $bookmark['url']));
		echo ' ';

		echo $that->Html->link(__('View', true),
			array('controller' => 'bookmarks', 'action' => 'view', $bookmark['id']),
			array('class' => 'edit_option'));
		echo ' ';
	}
}

<?php
# Copyright © 2012 Martin Ueding <dev@martin-ueding.de>

class BookmarkHelper extends AppHelper {
	var $helpers = array('Html');

	function print_bookmark($that, $bookmark) {
		echo $that->favicon($bookmark);

		echo $that->Html->link($bookmark['title'],
			array('controller' => 'bookmarks', 'action' => 'visit', $bookmark['id']),
			array('class' => 'bookmark_link', 'title' => $bookmark['url']));
		echo ' ';

		echo $that->Html->link(__('View', true),
			array('controller' => 'bookmarks', 'action' => 'view', $bookmark['id']),
			array('class' => 'edit_option'));
		echo ' ';
	}

	function favicon($bookmark) {
		$html = '';

		if (Configure::read('favicon.show')) {
			$html .= '<img width="16" height="16" src="data:image/ico;base64,'
				.$this->requestAction('/bookmarks/favicon/'.$bookmark['id'])
				.'" />';
			$html .= ' ';
		}

		return $html;
	}
}

Put favicon into separate function
Put favicon into separate function
