Merged branch 'MDL-25775_head' of git://github.com/grabs/moodle.git
authorSam Hemelryk <sam@moodle.com>
Wed, 8 Jun 2011 05:49:36 +0000 (13:49 +0800)
committerSam Hemelryk <sam@moodle.com>
Wed, 8 Jun 2011 05:49:36 +0000 (13:49 +0800)
1  2 
lib/resourcelib.php

@@@ -487,10 -487,14 +487,15 @@@ function resourcelib_embed_general($ful
      }
  
      $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;