Index: trunk/globals.php =================================================================== diff -u -r525 -r529 --- trunk/globals.php (.../globals.php) (revision 525) +++ trunk/globals.php (.../globals.php) (revision 529) @@ -632,8 +632,11 @@ $text = ReplaceURL($text); // BBCode: [code]xxx[/code] - $text = preg_replace('/\[code.*\]([^\]]*)\[\/code.*\]/Ue', 'highlight_string( stripslashes(_unhtmlentities("$1") ), true)', $text); - + $text = str_replace("\n",chr(1),$text); + $text = str_replace("\r",chr(2),$text); + $text = preg_replace('/\[code[^\]]*\](.*)\[\/code[^\]]*\]/Ue', 'highlight_string( _unhtmlentities("$1") , true)', $text); + $text = str_replace(chr(1),"\n",$text); + $text = str_replace(chr(2),"\r",$text); return $text; }