Community
Participate
Working Groups
We need to replace the '"' character with '"' when marshalling. We will currently marshal the attribute string: "A\"B" like: myAttribute="A"B" which will cause unmarshal exceptions. We should write out: "A"B" The fix will need to be done in WriterRecord and OutputStreamRecord. We already escape '<' and '&' in the writeValue method; we will need to add a case for '"'.
This fix is required in the 1.1.0 branch, and will also be merged into subsequent branches.
Created attachment 171137 [details] Contains proposed fix + test case modifications for the 1.1 stream This patch is for the 1.1 stream.
Checked in fix for 1.1 stream. Reviewed by: matt.macivor@oracle.com Tests: all unit tests pass as expected; oxm/mappings/directtofield/identifiedbyname/xmlattribute/DirectToXMLAttributeIdentifiedByNameSpecialCharactersTestCases; oxm/mappings/directtofield/identifiedbyname/xmlelement/DirectToXMLElementIdentifiedByNameSpecialCharactersTestCases
Created attachment 171150 [details] Contains proposed fix + test case modifications for the 1.2 stream
Created attachment 171151 [details] Contains proposed fix + test case modifications for the 2.0 stream
Created attachment 171152 [details] Contains proposed fix + test case modifications for the 2.1 stream
To me, the patch seems to miss escaping '>' (>) and '\'' (').
(In reply to comment #7) > To me, the patch seems to miss escaping '>' (>) and '\'' ('). This bug deals specifically with '"'. We currently have no plans to escape characters other than '&' (&), '<' (<), and '"' ("). If this is something you require, you may want to file a bug and we can investigate further.
Fix checked into the 2.2 stream. Only 2.1 stream remains...
Fix was also checked into the 1.2 stream...
Fix checked into the 2.1 stream. Reviewed by: matt.macivor@oracle.com, blaise.doughan@oracle.com Tests: all unit tests pass as expected; jaxb/xmlelement/XmlElementTestCases; oxm/mappings/directtofield/identifiedbyname/xmlattribute/DirectToXMLAttributeIdentifiedByNameSpecialCharactersTestCases; oxm/mappings/directtofield/identifiedbyname/xmlelement/DirectToXMLElementIdentifiedByNameSpecialCharactersTestCases
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink