[ 
https://jira.codehaus.org/browse/XSTR-684?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=284427#comment-284427
 ] 

Boon Elschenbroich edited comment on XSTR-684 at 11/28/11 7:41 AM:
-------------------------------------------------------------------

Hi Joerg,

from my point of view the PrettyPrintWriter writeText should contain the check 
for the characters in question, like:

{code}
                    if (mode == XML_1_0) {
                        if (c < 9
                            || c == '\u000b'
                            || c == '\u000c'
                            || c == '\u000e'
                            || c == '\u000f'
                            || (c >= '\u0010' && c <= '\u001F')) {   // 
additional check for XSTR-684
                            throw new StreamException("Invalid character 0x"
                                + Integer.toHexString(c)
                                + " in XML 1.0 stream");
                        }
                    }

{code}

      was (Author: boon):
    Hi Joerg,

from my point of view the PrettyPrintWriter writeText should contain the check 
for the characters in question, like:

                    if (mode == XML_1_0) {
                        if (c < 9
                            || c == '\u000b'
                            || c == '\u000c'
                            || c == '\u000e'
                            || c == '\u000f'
                            || (c >= '\u0010' && c <= '\u001F')) {   // 
additional check for XSTR-684
                            throw new StreamException("Invalid character 0x"
                                + Integer.toHexString(c)
                                + " in XML 1.0 stream");
                        }
                    }


  
> XML 1.0 character validation does not detect wrong charcters between #x10 and 
> #x1F
> ----------------------------------------------------------------------------------
>
>                 Key: XSTR-684
>                 URL: https://jira.codehaus.org/browse/XSTR-684
>             Project: XStream
>          Issue Type: Bug
>          Components: IO
>    Affects Versions: 1.3.1
>            Reporter: Boon Elschenbroich
>            Assignee: Joerg Schaible
>         Attachments: XStreamXMLComplianceTest.java
>
>
> With issue XSTR-473 the validation of characters for XML 1.0 has been 
> introduced. This works fine for most of the charcters that are not allowed in 
> XML, but it does not work for the characters in the range #x10 and #x1F, 
> which are not allowed as well refering to the XML spec:
> #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

<hr/>
<p>
To unsubscribe from this list please visit:
</p>
<p>
    <a 
href="http://xircles.codehaus.org/manage_email";>http://xircles.codehaus.org/manage_email</a>

Reply via email to