Closed dmitrikudrenko closed 8 years ago
As a quick workaround, you should be able to use < and > in place of the angle brackets and they will be rendered properly. CDATA support is likely to be pretty hacky/brittle but I'll look into it.
Well, I set objects to chunk. I wouldn't like to change objects
Oh, I misunderstood the question. I think what you really want is to escape the value properly? There are template filters that exist for exactly this purpose:
<p>{$item.name|xmlescape}</p>
This can be abbreviated to just:
<p>{$item.name|xml}</p>
As far as the comment tags go, I am unable to reproduce the behavior you are seeing. Can you attach a simple case of template and java code that produces the mysterious commenting?
closing for now, will reopen if reproducible case is submitted.
I have a troubles when I set expression like this
Cucumber<br>
in xml like that<p>{$item.name}</p>
. In that case I receive invalid xml -<p>Cucumber<br></p>
. I tryed change xml-pattern to<p><![CDATA[{$item.name}]]><p>
. But in that case I receive weird result:<p><!--[CDATA[Cucumber<br>]]--></p>
Why do you comment CDATA? Can you offer me some workaround?