CDATA is removed when exporting a diagram


#1

I load a simple diagram that contains an expression written inside a CDATA like so:

  <bpmn:process id="Process_1" name="Process_1">
    <bpmn:userTask id="Task_113xykg" name="Test">
      <bpmn:humanPerformer id="ID_048qa5g" name="CheckInputResource">
        <bpmn:resourceAssignmentExpression id="ID_19xkliu">
          <bpmn:expression id="ID_0hnlswl"> <![CDATA[test > 1 && test < 10]]></bpmn:expression>
        </bpmn:resourceAssignmentExpression>
      </bpmn:humanPerformer>
    </bpmn:userTask>
  </bpmn:process>

When exporting the CDATA gets removed and instead characters are escaped::

  <bpmn:process id="Process_1" name="Process_1">
    <bpmn:userTask id="Task_113xykg" name="Test">
      <bpmn:humanPerformer id="ID_048qa5g" name="CheckInputResource">
        <bpmn:resourceAssignmentExpression id="ID_19xkliu">
          <bpmn:expression id="ID_0hnlswl">test &gt; 1 &amp;&amp; test &lt; 10</bpmn:expression>
        </bpmn:resourceAssignmentExpression>
      </bpmn:humanPerformer>
    </bpmn:userTask>
  </bpmn:process>

Here is a JsFiddle example
Previous versions (v0.18.4) kept the CDATA. Is this a bug or is this intentional with the new versions?


#2

This is a feature, not a bug.

Cf. moddle-xml@6.0.0.