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 10 Aug 2007 09:40:56 -0000 @@ -332,7 +332,18 @@ function _bbcode_notag_tag($text = NULL) } function _bbcode_php_tag($text = NULL) { - return '
'. highlight_string( str_replace('
', '', stripslashes($text)), true) .'
'; + $text = str_replace('
', '', stripslashes($text)); + // PHP requires special start and end tags for highlighting + if (strpos($text, ""; + } + $text = highlight_string($text, TRUE); + // Make PHP output xhtml compliant + $text = str_replace( + array( '' ), + $text ); + return '
'. $text .'
'; } function _bbcode_round_size_val($size) {