diff --git a/lib/editor/htmlarea/coursefiles.php b/lib/editor/htmlarea/coursefiles.php
index 4c04eed..ccafadc 100644
--- a/lib/editor/htmlarea/coursefiles.php
+++ b/lib/editor/htmlarea/coursefiles.php
@@ -142,7 +142,7 @@
 
             var prev = window.parent.ipreview;
             if(prev != null) {
-                prev.location.replace('about:blank');
+                prev.location.replace('<?php echo $CFG->wwwroot ?>/lib/editor/htmlarea/blank.html');
             }
             var uploader = window.parent.document.forms['uploader'];
             if(uploader != null) {
diff --git a/lib/editor/htmlarea/htmlarea.php b/lib/editor/htmlarea/htmlarea.php
index 87d4122..fee6d10 100644
--- a/lib/editor/htmlarea/htmlarea.php
+++ b/lib/editor/htmlarea/htmlarea.php
@@ -721,7 +721,7 @@ HTMLArea.prototype.generate = function () {
     // create the IFRAME
     var iframe = document.createElement("iframe");
 
-    iframe.src = "about:blank";
+    iframe.src = "<?php echo $CFG->wwwroot ?>/lib/editor/htmlarea/blank.html";
 
     iframe.className = "iframe";
 
diff --git a/lib/editor/htmlarea/popups/insert_image.php b/lib/editor/htmlarea/popups/insert_image.php
index 3a3c4c3..d68bec5 100644
--- a/lib/editor/htmlarea/popups/insert_image.php
+++ b/lib/editor/htmlarea/popups/insert_image.php
@@ -90,9 +90,9 @@ function onPreview() {
   img.src = url;
   var win = null;
   if (!document.all) {
-    win = window.open("about:blank", "ha_imgpreview", "toolbar=no,menubar=no,personalbar=no,innerWidth=100,innerHeight=100,scrollbars=no,resizable=yes");
+    win = window.open("<?php echo $CFG->wwwroot ?>/lib/editor/htmlarea/blank.html", "ha_imgpreview", "toolbar=no,menubar=no,personalbar=no,innerWidth=100,innerHeight=100,scrollbars=no,resizable=yes");
   } else {
-    win = window.open("about:blank", "ha_imgpreview", "channelmode=no,directories=no,height=100,width=100,location=no,menubar=no,resizable=yes,scrollbars=no,toolbar=no");
+    win = window.open("<?php echo $CFG->wwwroot ?>/lib/editor/htmlarea/blank.html", "ha_imgpreview", "channelmode=no,directories=no,height=100,width=100,location=no,menubar=no,resizable=yes,scrollbars=no,toolbar=no");
   }
   preview_window = win;
   var doc = win.document;
@@ -269,7 +269,7 @@ form { margin-bottom: 0px; margin-top: 0px; }
       ?>
       </td>
       <td width="45%" valign="top"><?php print_string("preview","editor");?>:<br />
-      <iframe id="ipreview" name="ipreview" src="about:blank" style="width: 100%; height: 200px;"></iframe>
+      <iframe id="ipreview" name="ipreview" src="<?php echo $CFG->wwwroot ?>/lib/editor/htmlarea/blank.html" style="width: 100%; height: 200px;"></iframe>
       </td>
     </tr>
   </table>
diff --git a/lib/editor/htmlarea/popups/insert_image_std.php b/lib/editor/htmlarea/popups/insert_image_std.php
index 6f12d9c..a2684be 100644
--- a/lib/editor/htmlarea/popups/insert_image_std.php
+++ b/lib/editor/htmlarea/popups/insert_image_std.php
@@ -6,7 +6,7 @@
     require_course_login($id);
     @header('Content-Type: text/html; charset=utf-8');
 ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+STD<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html>
 <head>
@@ -82,9 +82,9 @@ function onPreview() {
   img.src = url;
   var win = null;
   if (!document.all) {
-    win = window.open("about:blank", "ha_imgpreview", "toolbar=no,menubar=no,personalbar=no,innerWidth=100,innerHeight=100,scrollbars=no,resizable=yes");
+    win = window.open("<?php echo $CFG->wwwroot ?>/lib/editor/htmlarea/blank.html", "ha_imgpreview", "toolbar=no,menubar=no,personalbar=no,innerWidth=100,innerHeight=100,scrollbars=no,resizable=yes");
   } else {
-    win = window.open("about:blank", "ha_imgpreview", "channelmode=no,directories=no,height=100,width=100,location=no,menubar=no,resizable=yes,scrollbars=no,toolbar=no");
+    win = window.open("<?php echo $CFG->wwwroot ?>/lib/editor/htmlarea/blank.html", "ha_imgpreview", "channelmode=no,directories=no,height=100,width=100,location=no,menubar=no,resizable=yes,scrollbars=no,toolbar=no");
   }
   preview_window = win;
   var doc = win.document;
