Language: JavaScript
Label: vulnerable
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:
e&&e!=mxConstants.NONE&&y.push("highlight="+("#"==e.charAt(0)?e.substring(1):e)),null!=p&&0<p.length&&y.push("edit="+encodeURIComponent(p)),t&&y.push("layers=1"),this.editor.graph.foldingEnabled&&y.push("nav=1"));k&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&y.push("page-id="+this.currentPage.getId());return y};EditorUi.prototype.createLink=function(c,e,k,n,p,t,y,A,G,C){G=this.createUrlParameters(c,e,k,n,p,t,G);c=this.getCurrentFile();e=!0;null!=y?k="#U"+encodeURIComponent(y):
(c=this.getCurrentFile(),A||null==c||c.constructor!=window.DriveFile?k="#R"+encodeURIComponent(k?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(k="#"+c.getHash(),e=!1));e&&null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&G.push("title="+encodeURIComponent(c.getTitle()));C&&1<k.length&&(G.push("open="+k.substring(1)),k="");return(n&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||
!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<G.length?"?"+G.join("&"):"")+k};EditorUi.prototype.createHtml=function(c,e,k,n,p,t,y,A,G,C,V,S){this.getBasenames();var N={};""!=p&&p!=mxConstants.NONE&&(N.highlight=p);"auto"!==n&&(N.target=n);C||(N.lightbox=!1);N.nav=this.editor.graph.foldingEnabled;k=parseInt(k);isNaN(k)||100==k||(N.zoom=k/100);k=[];y&&(k.push("pages"),N.resize=!0,null!=this.pages&&null!=this.currentPage&&(N.page=mxUtils.indexOf(this.pages,