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:
y,H,O){for(var P=0;P<O;P++)g=Editor.crcTable[(g^y.charCodeAt(H+P))&255]^g>>>8;return g};Editor.crc32=function(g){for(var y=-1,H=0;H<g.length;H++)y=y>>>8^Editor.crcTable[(y^g.charCodeAt(H))&255];return(y^-1)>>>0};Editor.writeGraphModelToPng=function(g,y,H,O,P){function V(Y,ea){var fa=X;X+=ea;return Y.substring(fa,X)}function R(Y){Y=V(Y,4);return Y.charCodeAt(3)+(Y.charCodeAt(2)<<8)+(Y.charCodeAt(1)<<16)+(Y.charCodeAt(0)<<24)}function W(Y){return String.fromCharCode(Y>>24&255,Y>>16&255,Y>>8&255,Y&255)}
g=g.substring(g.indexOf(",")+1);g=window.atob?atob(g):Base64.decode(g,!0);var X=0;if(V(g,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=P&&P();else if(V(g,4),"IHDR"!=V(g,4))null!=P&&P();else{V(g,17);P=g.substring(0,X);do{var Z=R(g);if("IDAT"==V(g,4)){P=g.substring(0,X-8);"pHYs"==y&&"dpi"==H?(H=Math.round(O/.0254),H=W(H)+W(H)+String.fromCharCode(1)):H=H+String.fromCharCode(0)+("zTXt"==y?String.fromCharCode(0):"")+O;O=4294967295;O=Editor.updateCRC(O,y,0,4);O=Editor.updateCRC(O,
H,0,H.length);P+=W(H.length)+y+H+W(O^4294967295);P+=g.substring(X-8,g.length);break}P+=g.substring(X-8,X-4+Z);V(g,Z);V(g,4)}while(Z);return"data:image/png;base64,"+(window.btoa?btoa(P):Base64.encode(P,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var F=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(g,y){F.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var K=ColorDialog.resetRecentColors;