Jelly - Phase 2 - HTML escaping - CDATA - All your base are belong to us
Whenever I get a question about Jelly I start to sweat nervously. Then you throw in a question about phase 1 and phase 2 idiosyncrasies and I start to mumble like a crazy person. So, here's a little story I've got to tell -
Stephan Nolan, an employee working with me at RMIT, asked the question:
"We have a dynamic content block with the following:
<?xml version="1.0" encoding="utf-8" ?>
Hello World
</p> <p><![CDATA[<br><br> <label\><br><br> <input <br> name\="example" <br> type\="radio" <br> value\="1" <br> {{#if blah}}checked\="checked"{{/if}} <br> /\><br><br> <span\>Radio button</span\><br><br> </label\><br><br> ]]><br><br> </script\><br><br> </j:jelly> </p> <p>Which works fine when two phase is turned off. However when we turn it on, the <![CDATA[]]> tags are being ignored and the following error is thrown </p> <p>Element type "input" must be followed by either attribute specifications, ">" or "/>".: org.xml.sax.SAXParseException: Element type "input" must be followed by either attribute specifications, ">" or "/>".:</p>
https://www.servicenow.com/community/developer-blog/jelly-phase-2-html-escaping-cdata-all-your-base-are-belong-to-us/ba-p/2269403