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:
!d.isOfflineApp()&&isLocalStorage&&this.addMenuItem(l,"plugins",n),this.addMenuItems(l,["-","editDiagram"],n),this.addSubmenu("diagramLanguage",l,n),l.addSeparator(n),"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(l,["showStartScreen"],n),this.addMenuItems(l,["configuration"],n),l.addSeparator(n),"1"==urlParams.newTempDlg&&(d.actions.addAction("templates",function(){function E(N){return{id:N.id,isExt:!0,url:N.downloadUrl,title:N.title,imgUrl:N.thumbnailLink,changedBy:N.lastModifyingUserName,
lastModifiedOn:N.modifiedDate}}var A=new TemplatesDialog(d,function(N){console.log(arguments)},null,null,null,"user",function(N,Q,L){var U=new Date;U.setDate(U.getDate()-7);d.drive.listFiles(null,U,L?!0:!1,function(g){for(var y=[],H=0;H<g.items.length;H++)y.push(E(g.items[H]));N(y)},Q)},function(N,Q,L,U){d.drive.listFiles(N,null,U?!0:!1,function(g){for(var y=[],H=0;H<g.items.length;H++)y.push(E(g.items[H]));Q(y)},L)},function(N,Q,L){d.drive.getFile(N.id,function(U){Q(U.data)},L)},null,function(N){N({Test:[]},