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:
EditorUi.prototype.removePage=function(b){try{var e=this.editor.graph,g=mxUtils.indexOf(this.pages,b);if(e.isEnabled()&&0<=g){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e.model.beginUpdate();try{var p=this.currentPage;p==b&&1<this.pages.length?(g==this.pages.length-1?g--:g++,p=this.pages[g]):1>=this.pages.length&&(p=this.insertPage(),e.model.execute(new RenamePage(this,p,mxResources.get("pageWithNumber",[1]))));e.model.execute(new ChangePage(this,b,p))}finally{e.model.endUpdate()}}}catch(y){this.handleError(y)}return b};