Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] [MOXy] escaping special characters in Strings

Hi Blaise,

Thank you for pointing out the relevant section in the XML spec.  That
clarifies things.  I have only seen a problem with the double-quotes which
you have now fixed.  I haven't seen any issues with the single quote or
greater than character.  I agree that since EclipseLink always uses double
quotes for attributes that single quotes would not cause a problem.  I
suppose that it is possible that we could have data where the greater than
sign might follow two square brackets like "]]>", but that is also unlikely. 
So I think we are fine with the current marshaling behavior.  :)

Thank you for the help!
Polly


Blaise Doughan wrote:
> 
> Hi Polly,
> 
> The following is my current understanding.  According to section 2.4 
> from the XML specification (http://www.w3.org/TR/REC-xml/), less-than 
> (<) and ampersand (&) must always be escaped.  greater-than need only be 
> escaped when it follows ]] and is not marking the end of a CData 
> section.  The single-quote need only be escaped when the attribute value 
> is surrounded in single-quotes, since EclipseLink always surrounds 
> attribute values in double-quote (") the escaping isn't necessary.  Are 
> you seeing any errors with the current configuration?
> 
> -Blaise
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/-MOXy--escaping-special-characters-in-Strings-tp28759006p28893779.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top