Index: trunk/globals.php =================================================================== diff -u -N -r759 -r760 --- trunk/globals.php (.../globals.php) (revision 759) +++ trunk/globals.php (.../globals.php) (revision 760) @@ -649,10 +649,23 @@ $text = preg_replace('/\[code\](.*)\[\/code\]/Uise', "ReplaceCodeBBCode('$1')", $text); return $text; } +function leadSpace2nbsp($x) +{ + return "\n".str_repeat(' ',strlen($x)); +} function ReplaceCodeBBCode($input_string) { $input_string=str_replace('\"','"',$input_string); $input_string=$GLOBALS['objSmileys']->UndoSmileys(_unhtmlentities($input_string)); + $input_string=trim($input_string); + $input_string=inp_htmlize($input_string); + $input_string=str_replace("\r",'',$input_string); + $input_string = str_replace("\t", " ", $input_string); + $input_string = preg_replace('/\n( +)/se',"leadSpace2nbsp('$1')",$input_string); + $input_string='
'.$input_string.'
'; +// $input_string=''; + return $input_string; + if(false!==strpos($input_string,'<'.'?')) { $input_string=str_replace('<'.'?','<'.'?php',$input_string);