elena 2003/05/30 06:35:44
Modified: java/src/org/apache/xml/serialize XMLSerializer.java
XML11Serializer.java
Log:
Fixing bug: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18374
Revision Changes Path
1.51 +5 -1 xml-xerces/java/src/org/apache/xml/serialize/XMLSerializer.java
Index: XMLSerializer.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xml/serialize/XMLSerializer.java,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- XMLSerializer.java 13 May 2003 14:28:32 -0000 1.50
+++ XMLSerializer.java 30 May 2003 13:35:44 -0000 1.51
@@ -1261,6 +1261,10 @@
_printer.printText("<");
} else if (ch == '&') {
_printer.printText("&");
+ } else if (ch == '>'){
+ // character sequence "]]>" can't appear in content, therefore
+ // we should escape '>'
+ _printer.printText(">");
} else if ( ch == '"' && ! keepQuot) {
_printer.printText(""");
} else if ( ( ch >= ' ' && _encodingInfo.isPrintable((char)ch)) ||
1.4 +5 -1
xml-xerces/java/src/org/apache/xml/serialize/XML11Serializer.java
Index: XML11Serializer.java
===================================================================
RCS file:
/home/cvs/xml-xerces/java/src/org/apache/xml/serialize/XML11Serializer.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- XML11Serializer.java 13 May 2003 14:28:32 -0000 1.3
+++ XML11Serializer.java 30 May 2003 13:35:44 -0000 1.4
@@ -382,6 +382,10 @@
_printer.printText("<");
} else if (ch == '&') {
_printer.printText("&");
+ } else if (ch == '>'){
+ // character sequence "]]>" can't appear in content, therefore
+ // we should escape '>'
+ _printer.printText(">");
} else if ( ch == '"' && !keepQuot) {
_printer.printText(""");
} else if ( _encodingInfo.isPrintable((char)ch) &&
XML11Char.isXML11ValidLiteral(ch)) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]