From feb30eda03e488dfc6a5da0c9320897644c582fb Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Fri, 18 Jan 2013 11:11:49 +0800 Subject: [PATCH] MDL-30769 - URL module: always use iframe instead of problematic object tag --- lib/resourcelib.php | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/lib/resourcelib.php b/lib/resourcelib.php index 6cf51b49299..10b0ea9cf7a 100644 --- a/lib/resourcelib.php +++ b/lib/resourcelib.php @@ -262,35 +262,17 @@ function resourcelib_embed_general($fullurl, $title, $clicktoopen, $mimetype) { $fullurl = $fullurl->out(); } - $iframe = false; - $param = ''; - // IE can not embed stuff properly, that is why we use iframe instead. - // Unfortunately this tag does not validate in xhtml strict mode, - // but in any case it is undeprecated in HTML 5 - we will use it everywhere soon! - if ($mimetype === 'text/html' and check_browser_version('MSIE', 5)) { - $iframe = true; - } - - if ($iframe) { - $code = << EOT; - } else { - $code = << - - $param - $clicktoopen - - -EOT; - } // the size is hardcoded in the boject obove intentionally because it is adjusted by the following function on-the-fly $PAGE->requires->js_init_call('M.util.init_maximised_embed', array('resourceobject'), true);