Closed stanio closed 12 years ago
This appears same as/duplicate of issue #7. The patch here however doesn't touch jax/jaxrs/model/ResourceMethod.java
, but takes care of escaping/encoding in the Writer
classes, which is more appropriate place, in my opinion.
This is fixed by #7. Thanks for reporting. I personally think it's better to correct the encoding issue in ResourceMethod, but only time will tell if that's right or not.
I personally think it's better to correct the encoding issue in ResourceMethod, but only time will tell if that's right or not.
My rationale is the Writer
takes care of generating output content in some format, that is encoding the content in that format, while ResourceMethod
is a model object encapsulating the content independent of specific output format. "Mangling" the content in the model in first place would make the output in a different format much trickier, the least.
There are few places which output raw & (ampersand) character in the HTML source, like:
which leads to undesired rendering (the least) like:
Proposed patch: