diff --git a/html/inc/text_transform.inc b/html/inc/text_transform.inc
index e07b936ffc..c349148497 100644
--- a/html/inc/text_transform.inc
+++ b/html/inc/text_transform.inc
@@ -104,12 +104,33 @@ function get_output_options($user) {
// Converts bbcode to proper HTML
// If $export is true, don't use BOINC CSS
+// handle [pre] separately because we need to remove
s
+//
+function replace_pre($text, $export) {
+ if ($export) {
+ return preg_replace_callback(
+ "@\[pre\](.*?)\[/pre\]@is",
+ function ($matches) {
+ return "
".remove_br(substr($matches[0], 5, -6)).""; + }, + $text + ); + } else { + return preg_replace_callback( + "@\[pre\](.*?)\[/pre\]@is", + function ($matches) { + return "
\\1", "
\\1
",
"\\1",
"\\1",
@@ -172,7 +192,6 @@ function bb2html($text, $export=false) {
);
} else {
$htmltags = array (
- "