Use images in pagination links I am using drupal 7 and i am trying to override the pager.inc function like this .

function bartik_pager_first($variables) {
  $text = '&lt;img src="http://localhost/drupal/themes/bartik/logo.png"&gt;&lt;/img&gt;';
  $element = $variables['element'];
//  $parameters = $variables['parameters'];
  global $pager_page_array;
  $output = '';

  // If we are anywhere but the first page
  if ($pager_page_array[$element] &gt; 0) {
    $output = theme('pager_link', array('text' =&gt; $text, 'page_new' =&gt; pager_load_array(0, $element, $pager_page_array), 'element' =&gt; $element, 'parameters' =&gt; $parameters));
  }

  return $output;
}


As you can see i am just trying to print the image for the text "first". But its just displaying like

&lt;img src="http://localhost/drupal/themes/bartik/logo.png"&gt;&lt;/img&gt;


How do i tell drupal that display it as html image rather then just text.
You have to override theme_pager_link() as well. The last line calls the l() function and you have to force it to render html.

Another possibility is to use css to theme the links