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:
"simple"==Editor.currentTheme&&this.addMenuItems(K,["zoomIn","zoomOut","-"],null,V);I.apply(this,arguments);e.isSelectionEmpty()||null==c.addSelectionToScratchpad||this.addMenuItems(K,["-","addToScratchpad"],null,V);e.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(K,["-","exitGroup","home"],null,V)};var A=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(K,O,V){if(c.editor.graph.isSelectionEmpty())A.apply(this,arguments),c.menus.addMenuItems(K,["copyAsImage"],
null,V);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(K,O,V):this.addPopupMenuArrangeItems(K,O,V),this.addMenuItems(K,"- cut copy copyAsImage duplicate -".split(" "),null,V),this.isShowCellEditItems()||this.addPopupDeleteItem(K,O,V),this.addMenuItems(K,["lockUnlock","-"],null,V),!this.isShowStyleItems()){if(1==e.getSelectionCount()&&!e.isCellLocked(O)&&e.isCellEditable(O)&&(this.addSubmenu("editCell",K,null,mxResources.get("edit")),K.addSeparator(),e.getModel().isEdge(O))){this.addSubmenu("line",
K);var k=e.getModel().getGeometry(O);null!=k&&null!=k.points&&0<k.points.length&&this.addMenuItems(K,["clearWaypoints"],null,V)}1==e.getSelectionCount()&&this.addMenuItems(K,["enterGroup"],null,V);k=c.getSelectionState();null!=k.mergeCell?this.addMenuItem(K,"mergeCells"):(1<k.style.colspan||1<k.style.rowspan)&&this.addMenuItem(K,"unmergeCells")}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=