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