1.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java Fri Dec 10 07:38:28 2010 -0800 1.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java Mon Dec 13 13:44:47 2010 -0800 1.3 @@ -287,11 +287,11 @@ 1.4 HtmlTree script = new HtmlTree(HtmlTag.SCRIPT); 1.5 if(winTitle != null && winTitle.length() > 0) { 1.6 script.addAttr(HtmlAttr.TYPE, "text/javascript"); 1.7 - String scriptCode = "<!--\n" + 1.8 - " if (location.href.indexOf('is-external=true') == -1) {\n" + 1.9 - " parent.document.title=\"" + winTitle + "\";\n" + 1.10 - " }\n" + 1.11 - "//-->\n"; 1.12 + String scriptCode = "<!--" + DocletConstants.NL + 1.13 + " if (location.href.indexOf('is-external=true') == -1) {" + DocletConstants.NL + 1.14 + " parent.document.title=\"" + winTitle + "\";" + DocletConstants.NL + 1.15 + " }" + DocletConstants.NL + 1.16 + "//-->" + DocletConstants.NL; 1.17 RawHtml scriptContent = new RawHtml(scriptCode); 1.18 script.addContent(scriptContent); 1.19 } 1.20 @@ -306,15 +306,15 @@ 1.21 protected Content getFramesetJavaScript(){ 1.22 HtmlTree script = new HtmlTree(HtmlTag.SCRIPT); 1.23 script.addAttr(HtmlAttr.TYPE, "text/javascript"); 1.24 - String scriptCode = "\n targetPage = \"\" + window.location.search;\n" + 1.25 - " if (targetPage != \"\" && targetPage != \"undefined\")\n" + 1.26 - " targetPage = targetPage.substring(1);\n" + 1.27 - " if (targetPage.indexOf(\":\") != -1)\n" + 1.28 - " targetPage = \"undefined\";\n" + 1.29 - " function loadFrames() {\n" + 1.30 - " if (targetPage != \"\" && targetPage != \"undefined\")\n" + 1.31 - " top.classFrame.location = top.targetPage;\n" + 1.32 - " }\n"; 1.33 + String scriptCode = DocletConstants.NL + " targetPage = \"\" + window.location.search;" + DocletConstants.NL + 1.34 + " if (targetPage != \"\" && targetPage != \"undefined\")" + DocletConstants.NL + 1.35 + " targetPage = targetPage.substring(1);" + DocletConstants.NL + 1.36 + " if (targetPage.indexOf(\":\") != -1)" + DocletConstants.NL + 1.37 + " targetPage = \"undefined\";" + DocletConstants.NL + 1.38 + " function loadFrames() {" + DocletConstants.NL + 1.39 + " if (targetPage != \"\" && targetPage != \"undefined\")" + DocletConstants.NL + 1.40 + " top.classFrame.location = top.targetPage;" + DocletConstants.NL + 1.41 + " }" + DocletConstants.NL; 1.42 RawHtml scriptContent = new RawHtml(scriptCode); 1.43 script.addContent(scriptContent); 1.44 return script;