diff --git a/lib/filelib.php b/lib/filelib.php index 0d3ba4db597..45ea442d06b 100644 --- a/lib/filelib.php +++ b/lib/filelib.php @@ -2320,7 +2320,7 @@ function send_file($path, $filename, $lifetime = null , $filter=0, $pathisstring } else { // Try to put the file through filters - if ($mimetype == 'text/html') { + if ($mimetype == 'text/html' || $mimetype == 'application/xhtml+xml') { $options = new stdClass(); $options->noclean = true; $options->nocache = true; // temporary workaround for MDL-5136 @@ -2494,7 +2494,7 @@ function send_stored_file($stored_file, $lifetime=null, $filter=0, $forcedownloa readfile_accel($stored_file, $mimetype, !$dontdie); } else { // Try to put the file through filters - if ($mimetype == 'text/html') { + if ($mimetype == 'text/html' || $mimetype == 'application/xhtml+xml') { $options = new stdClass(); $options->noclean = true; $options->nocache = true; // temporary workaround for MDL-5136 diff --git a/mod/resource/lib.php b/mod/resource/lib.php index a0d1d5e6d77..943985404e2 100644 --- a/mod/resource/lib.php +++ b/mod/resource/lib.php @@ -383,7 +383,7 @@ function resource_pluginfile($course, $cm, $context, $filearea, $args, $forcedow // should we apply filters? $mimetype = $file->get_mimetype(); - if ($mimetype === 'text/html' or $mimetype === 'text/plain') { + if ($mimetype === 'text/html' or $mimetype === 'text/plain' or $mimetype === 'application/xhtml+xml') { $filter = $DB->get_field('resource', 'filterfiles', array('id'=>$cm->instance)); $CFG->embeddedsoforcelinktarget = true; } else {