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:
K,[O]);var W=g.model.getGeometry(O);null!=W&&(W=W.clone(),W.width=Math.max(W.width,R),W.height=Math.max(W.height,U),g.cellsResized([O],[W],!1));g.setAttributeForCell(O,"mermaidData",JSON.stringify({data:B,config:m.config},null,2))}finally{g.getModel().endUpdate()}},function(K){d.handleError(K)})},null,null,400,220);d.showDialog(N.container,420,300,!0,!0);N.init()};var n=g.cellEditor.startEditing;g.cellEditor.startEditing=function(O,N){try{var T=this.graph.getAttributeForCell(O,"plantUmlData");if(null!=
T)this.editPlantUmlData(O,N,T);else if(T=this.graph.getAttributeForCell(O,"mermaidData"),null!=T)this.editMermaidData(O,N,T);else{var m=g.getCellStyle(O);"1"==mxUtils.getValue(m,"metaEdit","0")?d.showDataDialog(O):n.apply(this,arguments)}}catch(B){d.handleError(B)}};g.getLinkTitle=function(O){return d.getLinkTitle(O)};g.customLinkClicked=function(O){var N=!1;try{d.handleCustomLink(O),N=!0}catch(T){d.handleError(T)}return N};var t=g.parseBackgroundImage;g.parseBackgroundImage=function(O){var N=t.apply(this,