diff --git a/lib/resourcelib.php b/lib/resourcelib.php
index 8988c61..b63989a 100644
--- a/lib/resourcelib.php
+++ b/lib/resourcelib.php
@@ -492,13 +492,13 @@ function resourcelib_embed_general($fullurl, $title, $clicktoopen, $mimetype) {
     }
 
     $iframe = false;
-
-    $param = '<param name="src" value="'.$fullurl.'" />';
-
     // 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)) {
+    if ($mimetype === 'text/html' and check_browser_version('MSIE')) {
+        $iframe = true;
+    }
+    else if ($mimetype === 'text/plain' and check_browser_version('MSIE')) {
         $iframe = true;
     }

