diff --git a/inc/functions.php b/inc/functions.php index cd1f8fde..ff5d51df 100755 --- a/inc/functions.php +++ b/inc/functions.php @@ -2085,6 +2085,8 @@ function markup(&$body, $track_cites = false) { $code = isset($val[2]) ? $val[2] : $val[1]; $code_lang = isset($val[2]) ? $val[1] : ""; + $code = rtrim(ltrim($code, "\r\n")); + $code = "
".str_replace(array("\n","\t"), array(" "," "), htmlspecialchars($code)).""; $body = str_replace("
", $code, $body);