Permalink
Browse files

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 <jonathan@catalyst.net.nz>
  • Loading branch information...
1 parent 1ab32a7 commit ea32b7ab44e5dbb9c6f84f610a0e8cb0c5dbf032 jonathanharker committed May 21, 2009
@@ -0,0 +1 @@
+<html></html>
@@ -142,7 +142,7 @@ function reset_value() {
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) {
@@ -715,7 +715,7 @@ function createButton(txt) {
// 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";
@@ -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 @@ function submit_form(dothis) {
?>
</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>
@@ -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;

0 comments on commit ea32b7a

Please sign in to comment.