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.isResampleImageSize=function(c,e){e=null!=e?e:this.resampleThreshold;return c>e};EditorUi.prototype.resizeImage=function(c,e,k,q,p,t,x){p=null!=p?p:this.maxImageSize;var C=Math.max(1,c.width),I=Math.max(1,c.height);if(q&&this.isResampleImageSize(null!=x?x:e.length,t))try{var B=Math.max(C/p,I/p);if(1<B){var T=Math.round(C/B),l=Math.round(I/B),n=document.createElement("canvas");n.width=T;n.height=l;n.getContext("2d").drawImage(c,0,0,T,l);var z=n.toDataURL();if(z.length<e.length){var E=