|
[
Permlink
| « Hide
]
peter royal added a comment - 04/Sep/03 04:16 AM
I would propose a new tag that captures its body as XML.
I suppose this is really two problems then. The first being that <j:set> sets the value of the variable to a String value even though the body is XML. And the second being that XMLOutput by default escapes text using XML entities.
But of course these two are linked to each other. If just one of them is fixed my problem is solved. The first one probably requires some thought and should maybe be implemented using a new tag as you say. The second one is really easy to solve, and makes a lot of sense IMHO. Also it makes a workaround for the first problem possible: <j:set var="foo"> Now that these two don't behave the same is really ugly. Also note that changing XMLOutput's default behaviour would also make the patch of
Yep, escaping XML keeps biting Jelly.
At some point in the past the default was the opposite.... I'd much prefer it didn't escape XML. Patch for XMLOutput. This patch changes the default behaviour of XMLOutput in such a way that the default static factory methods create instances which don't escape text using XML entities.
There are methods in XmlOutput to create XmlOutput with escaping turned on.
I'd rather we look at using those than brute force. You can use the core:file tag for this as well.
Do we have tests for the set tag and it's encode attribute?
I've committed a change that will allow us to switch the default easily.
My take is that we switch it to false, so that XML text is not escaped as the default. If someone wants escaping on, they can easily create an XMLOutput with it on using the methods. If I understand this last comment correctly, then the decision is to now apply the patch I submitted just about a year ago. Is this correct?
Yep. It's taken that long to get people interested
Made the default not to escape. Please re-open if this is an issue
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||