修改discuzcode.func.php中discuzcode方法,
修改最后一行的return $htmlon || $allowhtml ? $message : nl2br(str_replace(array("\t", ' ', ' '), array(' ', ' ', ' '), $message));
為
$tempstr= $htmlon || $allowhtml ? $message : nl2br(str_replace(array("\t", ' ', ' '), array(' ', ' ', ' '), $message));
$tempstr= str_replace(" "," ",$tempstr);//code標(biāo)簽在粘貼一些代碼的時(shí)候會(huì)把一些空格替換成" "從而出現(xiàn)亂碼,這是暫時(shí)性的解決策略,不嚴(yán)謹(jǐn),不過一般沒問題 by 楊中科
return $tempstr;