Language: JavaScript
Label: safe
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:
this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,g,n,q,t,x){"text/xml"!=n||/(\.drawio)$/i.test(g)||/(\.xml)$/i.test(g)||/(\.svg)$/i.test(g)||/(\.html)$/i.test(g)||(g=g+"."+(null!=x?x:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)d=q?this.base64ToBlob(d,n):new Blob([d],{type:n}),navigator.msSaveOrOpenBlob(d,g);else if(mxClient.IS_IE)n=window.open("about:blank","_blank"),null==
n?mxUtils.popup(d,!0):(n.document.write(d),n.document.close(),n.document.execCommand("SaveAs",!0,g),n.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==n||"image/"!=n.substring(0,6)?this.showTextDialog(g+":",d):this.openInNewWindow(d,n,q);else{var B=document.createElement("a");x=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof B.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var G=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);
x=65==(G?parseInt(G[2],10):!1)?!1:x}if(x||this.isOffline()){B.href=URL.createObjectURL(q?this.base64ToBlob(d,n):new Blob([d],{type:n}));x?B.download=g:B.setAttribute("target","_blank");document.body.appendChild(B);try{window.setTimeout(function(){URL.revokeObjectURL(B.href)},2E4),B.click(),B.parentNode.removeChild(B)}catch(I){}}else this.createEchoRequest(d,g,n,q,t).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,g,n,q,t,x){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,