Skip to content

Commit

Permalink
MDL-25775 - Site policy page blank
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Grabs committed Jun 6, 2011
1 parent a56c68e commit a9e9549
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/resourcelib.php
Expand Up @@ -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;
Expand All @@ -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>
Expand Down

0 comments on commit a9e9549

Please sign in to comment.