Language: JavaScript
Label: vulnerable
CWE: CWE-79 \u2014 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.

Code:
G,[K]);var U=e.model.getGeometry(K);null!=U&&(U=U.clone(),U.width=Math.max(U.width,P),U.height=Math.max(U.height,Q),e.cellsResized([K],[U],!1));e.setAttributeForCell(K,"mermaidData",JSON.stringify({data:y,config:k.config},null,2))}finally{e.getModel().endUpdate()}},function(G){c.handleError(G)})},null,null,400,220);c.showDialog(O.container,420,300,!0,!0);O.init()};var g=e.cellEditor.startEditing;e.cellEditor.startEditing=function(K,O){try{var V=this.graph.getAttributeForCell(K,"plantUmlData");if(null!=
V)this.editPlantUmlData(K,O,V);else if(V=this.graph.getAttributeForCell(K,"mermaidData"),null!=V)this.editMermaidData(K,O,V);else{var k=e.getCellStyle(K);"1"==mxUtils.getValue(k,"metaEdit","0")?c.showDataDialog(K):g.apply(this,arguments)}}catch(y){c.handleError(y)}};e.getLinkTitle=function(K){return c.getLinkTitle(K)};e.customLinkClicked=function(K){var O=!1;try{c.handleCustomLink(K),O=!0}catch(V){c.handleError(V)}return O};var q=e.parseBackgroundImage;e.parseBackgroundImage=function(K){var O=q.apply(this,