Index: src/org/apache/xml/serializer/ToHTMLStream.java =================================================================== --- src/org/apache/xml/serializer/ToHTMLStream.java (revision 384120) +++ src/org/apache/xml/serializer/ToHTMLStream.java (working copy) @@ -1312,6 +1312,19 @@ // We now we reset the next possible clean character. cleanStart = i + 1; } + else if (ch == '&') + { + // HTML 4.01 reads, "Authors should use "&" (ASCII decimal 38) + // instead of "&" to avoid confusion with the beginning of a character + // reference (entity reference open delimiter). + if (cleanLength > 0) + { + writer.write(chars, cleanStart, cleanLength); + cleanLength = 0; + } + writer.write("&"); + cleanStart = i + 1; + } else { // no processing for this character, just count how