1.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/markup/StringContent.java Tue May 14 10:14:55 2013 -0700 1.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/StringContent.java Tue May 14 10:14:55 2013 -0700 1.3 @@ -58,8 +58,8 @@ 1.4 * @param initialContent initial content for the object 1.5 */ 1.6 public StringContent(String initialContent) { 1.7 - stringContent = new StringBuilder( 1.8 - Util.escapeHtmlChars(nullCheck(initialContent))); 1.9 + stringContent = new StringBuilder(); 1.10 + appendChars(initialContent); 1.11 } 1.12 1.13 /** 1.14 @@ -81,7 +81,7 @@ 1.15 * @param strContent string content to be added 1.16 */ 1.17 public void addContent(String strContent) { 1.18 - stringContent.append(Util.escapeHtmlChars(nullCheck(strContent))); 1.19 + appendChars(strContent); 1.20 } 1.21 1.22 /** 1.23 @@ -111,4 +111,16 @@ 1.24 out.write(s); 1.25 return s.endsWith(DocletConstants.NL); 1.26 } 1.27 + 1.28 + private void appendChars(String s) { 1.29 + for (int i = 0; i < s.length(); i++) { 1.30 + char ch = s.charAt(i); 1.31 + switch (ch) { 1.32 + case '<': stringContent.append("<"); break; 1.33 + case '>': stringContent.append(">"); break; 1.34 + case '&': stringContent.append("&"); break; 1.35 + default: stringContent.append(ch); break; 1.36 + } 1.37 + } 1.38 + } 1.39 }