- Revision
- 1951
- Author
- joehni
- Date
- 2011-11-28 13:02:16 -0600 (Mon, 28 Nov 2011)
Log Message
XML 1.0 character validation fails for characters from 0x10 to 0x1f (XSTR-684).
Modified Paths
Diff
Modified: trunk/xstream/src/java/com/thoughtworks/xstream/io/xml/PrettyPrintWriter.java (1950 => 1951)
--- trunk/xstream/src/java/com/thoughtworks/xstream/io/xml/PrettyPrintWriter.java 2011-11-21 22:46:17 UTC (rev 1950) +++ trunk/xstream/src/java/com/thoughtworks/xstream/io/xml/PrettyPrintWriter.java 2011-11-28 19:02:16 UTC (rev 1951) @@ -279,7 +279,7 @@ || c == '\u000b' || c == '\u000c' || c == '\u000e' - || c == '\u000f') { + || (c >= '\u000f' && c <= '\u001f')) { throw new StreamException("Invalid character 0x" + Integer.toHexString(c) + " in XML 1.0 stream");
Modified: trunk/xstream/src/test/com/thoughtworks/xstream/io/xml/PrettyPrintWriterTest.java (1950 => 1951)
--- trunk/xstream/src/test/com/thoughtworks/xstream/io/xml/PrettyPrintWriterTest.java 2011-11-21 22:46:17 UTC (rev 1950) +++ trunk/xstream/src/test/com/thoughtworks/xstream/io/xml/PrettyPrintWriterTest.java 2011-11-28 19:02:16 UTC (rev 1951) @@ -162,6 +162,8 @@ String ctrl = "" + "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007" + "\u0008\u0009\n\u000b\u000c\r\u000e\u000f" + + "\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017" + + "\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f" + "\u007f" + "\u0080\u0081\u0082\u0083\u0084\u0085\u0086\u0087" + "\u0088\u0089\u008a\u008b\u008c\u008d\u008e\u008f" @@ -193,6 +195,8 @@ String ctrl = "" + "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007" + "\u0008\u0009\n\u000b\u000c\r\u000e\u000f" + + "\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017" + + "\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f" + "\u007f" + "\u0080\u0081\u0082\u0083\u0084\u0085\u0086\u0087" + "\u0088\u0089\u008a\u008b\u008c\u008d\u008e\u008f" @@ -212,7 +216,9 @@ } writer.endNode(); assertXmlProducedIs("<tag>" - + "\t\n
" + + "\t\n
" + + "" + + "" + "€‚ƒ„…†‡" + "ˆ‰Š‹ŒŽ" + "‘’“”•–—"
Modified: trunk/xstream-distribution/src/content/changes.html (1950 => 1951)
--- trunk/xstream-distribution/src/content/changes.html 2011-11-21 22:46:17 UTC (rev 1950) +++ trunk/xstream-distribution/src/content/changes.html 2011-11-28 19:02:16 UTC (rev 1951) @@ -28,12 +28,16 @@ <a href="" Log</a>. </p> -<!-- <h1 id="upcoming">Upcoming</h1> <p>Not yet released.</p> ---> + <h2>Minor changes</h2> + + <ul> + <li>JIRA.XSTR-684: XML 1.0 character validation fails for characters from 0x10 to 0x1f.</li> + </ul> + <h1 id="1.4.2">1.4.2</h1> <p>Released 3. November 2011.</p>
To unsubscribe from this list please visit:
