-
Bug
-
Resolution: Won't Do
-
Blocker
-
3.3.0.Final
-
None
ModeShape's Jsr283Encoder class does not properly escape the whitespace characters:
Section 3.2.2 of JSR-283 defines a local name as follows:
LocalName ::= ValidString - SelfOrParent /* Any ValidString except SelfOrParent */ SelfOrParent ::= '.' | '..' ValidString ::= ValidChar {ValidChar} ValidChar ::= XmlChar - InvalidChar /* Any XmlChar except InvalidChar */ InvalidChar ::= '/' | ':' | '[' | ']' | '|' | '*' XmlChar ::= /* Any character that matches the Char production at http://www.w3.org/TR/xml/#NT-Char */
where the Char production at http://www.w3.org/TR/xml/#NT-Char is as follows:
Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] /* any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. */
Note that #x9 is the tab character, #xA is the line feed character, #xD is the carriage return character, and #x20 is the space character.
But ModeShape's Jsr283Encoder is not properly encoding/decoding the whitespace characters.
We will need to address whether this fix will be backward compatible. If not, we may need to provide a switch/repository setting that allows someone to use the older (incorrect) encoding/decoding.