@@ -1401,7 +1401,8 @@ public boolean setText(String html) {
14011401try {
14021402var doc = handle.contentWindow.document;
14031403doc.open ();
1404- if (O$.isIE) {
1404+ if (O$.isIE && window["xss.domain.enabled"] == true
1405+ && domain != null && domain.length > 0) {
14051406doc.domain = domain;
14061407}
14071408doc.write (html);
@@ -1420,12 +1421,17 @@ public boolean setText(String html) {
14201421 * @j2sNative
14211422var handle = arguments[0];
14221423var html = arguments[1];
1423- var domain = document.domain;
1424- if (O$.isIE) {
1424+ var domain = null;
1425+ try {
1426+ domain = document.domain;
1427+ } catch (e) {}
1428+ if (O$.isIE && window["xss.domain.enabled"] == true
1429+ && domain != null && domain.length > 0) {
14251430document.domain = domain;
14261431}
14271432if (handle.contentWindow != null) {
1428- if (O$.isIE) {
1433+ if (O$.isIE && window["xss.domain.enabled"] == true
1434+ && domain != null && domain.length > 0) {
14291435handle.contentWindow.location = "#"diff-5e6243b82ffcbc9f3d96ce3d0b687512adbf072754a6fd25e0083e29dea8d619-1430-1436-0" data-selected="false" role="gridcell" tabindex="-1" valign="top">1430
1436} else {
14311437handle.contentWindow.location = "about:blank";
@@ -1436,13 +1442,24 @@ public boolean setText(String html) {
14361442try {
14371443var doc = handle.contentWindow.document;
14381444doc.open ();
1439- if (O$.isIE) {
1445+ if (O$.isIE && window["xss.domain.enabled"] == true
1446+ && domain != null && domain.length > 0) {
14401447doc.domain = domain;
14411448}
14421449doc.write (html);
14431450doc.close ();
14441451} catch (e) {
1445- window.setTimeout (this.generateLazyIframeWriting (handle, domain, html), 25);
1452+ if (O$.isIE && (domain == null || domain.length == 0)
1453+ && e.message != null && e.message.indexOf ("Access is denied") != -1) {
1454+ var jsHTML = html.replaceAll("\\\\", "\\\\\\\\")
1455+ .replaceAll("\r", "\\\\r")
1456+ .replaceAll("\n", "\\\\n")
1457+ .replaceAll("\"", "\\\\\"");
1458+ handle.src = "#"diff-5e6243b82ffcbc9f3d96ce3d0b687512adbf072754a6fd25e0083e29dea8d619-1445-1459-0" data-selected="false" role="gridcell" tabindex="-1" valign="top">
1459+ // In IE 8.0, it is still failing ...
1460+ } else {
1461+ window.setTimeout (this.generateLazyIframeWriting (handle, domain, html), 25);
1462+ }
14461463}
14471464 */
14481465private native void iframeDocumentWrite (Object handle ,String html );