Index: codefilter.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/codefilter/codefilter.module,v
retrieving revision 1.24
diff -u -p -r1.24 codefilter.module
--- codefilter.module	28 Dec 2006 22:49:16 -0000	1.24
+++ codefilter.module	17 Aug 2007 22:49:42 -0000
@@ -35,6 +35,8 @@ function codefilter_process_php($text) {
   $text = trim($text, "\r\n");
   // Highlight as PHP
   $text = '<div class="codeblock">'. highlight_string("<?php\n$text\n?>", 1) .'</div>';
+  // In PHP4, highlight_string() returns font tags; replace them with span tags.
+  $text = str_replace(array('<font color="', '</font>'), array('<span style="color: ', '</span>'), $text);
   // Remove newlines to avoid clashing with the linebreak filter
   $text = str_replace("\n", '', $text);
   return codefilter_fix_spaces($text);
@@ -48,6 +50,8 @@ function codefilter_process_php_inline($
   $text = str_replace('<br />', '', $matches[0]);
   // Decode entities (the highlighter re-entifies) and highlight text
   $text = highlight_string(decode_entities($text), 1);
+  // In PHP4, highlight_string() returns font tags; replace them with span tags.
+  $text = str_replace(array('<font color="', '</font>'), array('<span style="color: ', '</span>'), $text);
   // Remove PHP's own added code tags
   $text = str_replace(array('<code>', '</code>', "\n"), array('', '', ''), $text);
   return $text;
