rajalakshmys-27 opened a new pull request, #3570:
URL: https://github.com/apache/incubator-kie-tools/pull/3570

   Closes: 
[kie-issues#2301](https://github.com/apache/incubator-kie-issues/issues/2301)
   
   When a faulty BPMN/DMN/SCESIM file is opened, any modification and export 
causes a `<parsererror>` element to appear at the top level of the exported 
XML, corrupting the file on every edit-export cycle.
   
   **Example faulty file:** 
https://gist.githubusercontent.com/rajalakshmys-27/28e82fd3de60d656a28a0ab654401e32/raw/855f4fc030cd560d66e6b2cb7107134e1518c90b/parseerror.bpmn
   
   ### Root Cause
   `<parsererror>` is automatically injected by the browser's DOMParser (and 
jsdom in Node.js) when it encounters schema violations such as elements in 
wrong locations, invalid attributes, or incorrect nesting. This is standard W3C 
behavior and cannot be disabled.
   
   ### Fix
   Filter out `<parsererror>` elements in `xml-parser-ts` immediately after 
parsing, before the document is returned to any marshaller. This single fix 
protects all marshallers (BPMN, DMN, SCESIM) automatically with no changes 
required elsewhere.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to