From: moodler Date: Tue, 10 Aug 2004 10:44:29 +0000 (+0000) Subject: Don't put HTML and text files through clean_text. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=ee88d30b4c8f07205756af37f22015daad4e0f15;p=moodle.git Don't put HTML and text files through clean_text. --- diff --git a/file.php b/file.php index 70f978a49b..f5c7d622c5 100644 --- a/file.php +++ b/file.php @@ -69,7 +69,8 @@ } else { /// Try and put the file through filters if ($mimetype == "text/html") { - $output = format_text(implode('', file($pathname)), FORMAT_HTML, NULL, $courseid); + $options->noclean = true; + $output = format_text(implode('', file($pathname)), FORMAT_HTML, $options, $courseid); header("Content-length: ".strlen($output)); header("Content-type: text/html"); @@ -77,6 +78,7 @@ } else if ($mimetype == "text/plain") { $options->newlines = false; + $options->noclean = true; $output = '
'.format_text(implode('', file($pathname)), FORMAT_MOODLE, $options, $courseid).'
'; header("Content-length: ".strlen($output)); header("Content-type: text/html");