Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 676e1d5

Browse files
committed
Fixed bug of being warned with "This page contains both secure and
nonsecure items." in IE 6 or later
1 parent 89c6aaa commit 676e1d5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

sources/net.sf.j2s.ajax/ajaxpipe/net/sf/j2s/ajax/SimplePipeRequest.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,9 @@ public void onLoaded() {
594594
pipeID = "pipe-script-" + pipeKey + "-" + Math.round (10000000 * Math.random ());
595595
} while (document.getElementById (pipeID) != null);
596596
iframe.id = pipeID;
597+
if (ClazzLoader.isIE) { // Avoid being warned with "This page contains both secure and nonsecure items."
598+
iframe.src = "javascript:false;"; // http://gemal.dk/blog/2005/01/27/iframe_without_src_attribute_on_https_in_internet_explorer/
599+
}
597600
document.body.appendChild (iframe);
598601
var html = "<html><head><title></title>";
599602
html += "<script type=\"text/javascript\">\r\n";
@@ -663,7 +666,9 @@ public void onLoaded() {
663666
if (handle.contentWindow != null) {
664667
if (ClazzLoader.isIE && window["xss.domain.enabled"] == true
665668
&& domain != null && domain.length > 0) {
666-
handle.contentWindow.location = "javascript:document.open();document.domain='" + domain + "';document.close();void(0);";
669+
handle.contentWindow.location = "javascript:document.open();document.domain='" + domain + "';document.close();false;"; // void(0);";
670+
} else if (ClazzLoader.isIE) {
671+
handle.contentWindow.location = "javascript:false;"; //"about:blank";
667672
} else {
668673
handle.contentWindow.location = "about:blank";
669674
}

0 commit comments

Comments
 (0)