Permalink
Browse files

MDL-25775 - Site policy page blank

  • Loading branch information...
1 parent dba2410 commit d230fb7bcdc0023c5a8e0ccbc0216922f4a3ea14 Andreas Grabs committed Jun 6, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/resourcelib.php
View
@@ -487,10 +487,14 @@ 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)) {
+ $param = '';
if (preg_match('(^https?://[^/]*)', $fullurl, $matches)) {
if (strpos($CFG->wwwroot, $matches[0]) !== 0) {
$iframe = true;
@@ -510,7 +514,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>

0 comments on commit d230fb7

Please sign in to comment.