? php_highlight3.patch Index: bbcode-filter.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/bbcode/bbcode-filter.inc,v retrieving revision 1.62 diff -u -p -r1.62 bbcode-filter.inc --- bbcode-filter.inc 3 Aug 2007 05:38:35 -0000 1.62 +++ bbcode-filter.inc 11 Aug 2007 21:56:26 -0000 @@ -21,10 +21,10 @@ function _bbcode_filter_process(&$body, elseif ($mode) { // Strip preformatted code blocks from text during line break processing, replaced below $body = str_replace($code_tag[0], "***pRe_sTrInG$i***", $body); - $pre[$i++] = '
'. $code_tag[1] .''; + $pre[$i++] = '
'. $code_tag[1] .'
'. $code_tag[1] .'', $body); + $body = str_replace($code_tag[0], '
'. $code_tag[1] .'
'. highlight_string( str_replace('
', '', stripslashes($text)), true) .'';
+ $text = "', '', trim(stripslashes($text))) ."\n?>";
+ $text = highlight_string($text, TRUE);
+ // Remove newlines to avoid clashing with the linebreak filter
+ $text = str_replace("\n", '', $text);
+ return ''. $text .'