Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merged branch 'MDL-25775_head' of git://github.com/grabs/moodle.git

  • Loading branch information...
commit 287d1c0c2cc85de30ace6815ce61bf77334f6652 2 parents 131a907 + a9e9549
@samhemelryk samhemelryk authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/resourcelib.php
View
7 lib/resourcelib.php
@@ -487,10 +487,15 @@ function resourcelib_embed_general($fullurl, $title, $clicktoopen, $mimetype) {
}
$iframe = false;
+
+ $param = '<param name="src" value="'.$fullurl.'" />';
+
// IE can not embed stuff properly if stored on different server
// that is why we use iframe instead, unfortunately this tag does not validate
// in xhtml strict mode
if ($mimetype === 'text/html' and check_browser_version('MSIE', 5)) {
+ // The param tag needs to be removed to avoid trouble in IE.
+ $param = '';
if (preg_match('(^https?://[^/]*)', $fullurl, $matches)) {
if (strpos($CFG->wwwroot, $matches[0]) !== 0) {
$iframe = true;
@@ -510,7 +515,7 @@ function resourcelib_embed_general($fullurl, $title, $clicktoopen, $mimetype) {
$code = <<<EOT
<div class="resourcecontent resourcegeneral">
<object id="resourceobject" data="$fullurl" type="$mimetype" width="800" height="600">
- <param name="src" value="$fullurl" />
+ $param
$clicktoopen
</object>
</div>
Please sign in to comment.
Something went wrong with that request. Please try again.