I have a simple restful service that transforms a JAXB-anntotated beans to response XML using RestEasy.
The XML tags could contain escaped special characters (e.g. –). But RestEasy marshaller escapes ampersand symbols one more time and i get – instead of – in the result XML.
How should I avoid the unnecessary ampersand escaping?
I’ve been hunting this down and there’s no way I can find to fine-tune the way RESTEasy escapes characters when it’s writing out the response. I’m working on using an interceptor to prevent this encoding.
For reference, it happens at setEscape() in the stack when it encodes UTF-8 XML.