From 369c4ab13da5ebce842040eb3e95122b952fc975 Mon Sep 17 00:00:00 2001 From: jonathanharker Date: Thu, 21 May 2009 02:28:33 +0000 Subject: [PATCH] MDL-12561 Fix IE6 "insecure items" warning in SSL sites using htmlarea The HTMLArea editor uses the about:blank URL for blank pages, which IE6 erroneously considers insecure. This commit replaces about:blank with lib/editor/htmlarea/blank.html instead. Author: Jonathan Harker --- lib/editor/htmlarea/blank.html | 1 + lib/editor/htmlarea/coursefiles.php | 2 +- lib/editor/htmlarea/htmlarea.php | 2 +- lib/editor/htmlarea/popups/insert_image.php | 6 +++--- lib/editor/htmlarea/popups/insert_image_std.php | 4 ++-- 5 files changed, 8 insertions(+), 7 deletions(-) create mode 100644 lib/editor/htmlarea/blank.html diff --git a/lib/editor/htmlarea/blank.html b/lib/editor/htmlarea/blank.html new file mode 100644 index 00000000000..18ecdcb795c --- /dev/null +++ b/lib/editor/htmlarea/blank.html @@ -0,0 +1 @@ + diff --git a/lib/editor/htmlarea/coursefiles.php b/lib/editor/htmlarea/coursefiles.php index 4f7441f627e..2a7d6982b77 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('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 87d4122317e..fee6d1081fe 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 = "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 3a3c4c34769..d68bec588b2 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("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("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; } ?> :
- + diff --git a/lib/editor/htmlarea/popups/insert_image_std.php b/lib/editor/htmlarea/popups/insert_image_std.php index 6f12d9cc63d..a8716248771 100644 --- a/lib/editor/htmlarea/popups/insert_image_std.php +++ b/lib/editor/htmlarea/popups/insert_image_std.php @@ -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("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("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;