Language: JavaScript
Label: safe
CWE: CWE-78 \u2014 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.

Code:
d,B.pasteCounter=0);var K=B.pasteCounter*B.gridSize;if(k||this.isCompatibleString(d))F=this.importXml(d,K,K),B.setSelectionCells(F);else if(f&&1==B.getSelectionCount()){z=B.getStartEditingCell(B.getSelectionCell(),u);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==B.getCurrentCellStyle(z)[mxConstants.STYLE_SHAPE])B.setCellStyles(mxConstants.STYLE_IMAGE,d,[z]);else{B.model.beginUpdate();try{B.labelChanged(z,d),Graph.isLink(d)&&B.setLinkForCell(z,d)}finally{B.model.endUpdate()}}B.setSelectionCell(z)}else F=
B.getInsertPoint(),B.isMouseInsertPoint()&&(K=0,B.lastPasteXml==d&&0<B.pasteCounter&&B.pasteCounter--),F=this.insertTextAt(d,F.x+K,F.y+K,z),B.setSelectionCells(F);B.isSelectionEmpty()||(B.scrollCellToVisible(B.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(B.view.getState(B.getSelectionCell())));return F};EditorUi.prototype.pasteCells=function(d,f,k,u){if(!mxEvent.isConsumed(d)){var z=f,B=!1;if(k&&null!=d.clipboardData&&d.clipboardData.getData){var F=d.clipboardData.getData("text/plain"),