Index: trunk/globals.php =================================================================== diff -u -r491 -r493 --- trunk/globals.php (.../globals.php) (revision 491) +++ trunk/globals.php (.../globals.php) (revision 493) @@ -616,15 +616,22 @@ function ReplaceBBCode($text) { - global $objConfig; + global $objConfig; - $tags = explode(",",$objConfig->Get("BBTags")); - for($i=0;$iGet("BBTags")); + for($i = 0; $i < count($tags); $i++) + { + $text = ReplaceTag(strtoupper($tags[$i]),$text); + } + + // BBCode: [url href="xxx"]xxx[/url] + $text = ReplaceURL($text); + + // BBCode: [code]xxx[/code] + $text = preg_replace('/\[code\]([^\]]*)\[\/code\]/Ue', 'highlight_string( stripslashes(_unhtmlentities("$1") ), true)', $text); + + return $text; } function GetMinValue($Table,$Field, $Where=NULL)