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:
K.restore();return ca}if(H.vertex){ca=d(oa,T,I,N,Q,V);var ka=L.view.getState(H,!0);null!=ka&&(b(ka,ca,N),K.newShape(ca,ka,N),null!=ka.text&&ka.text.checkBounds()&&(K.save(),ka.text.paint(K),K.restore()),null!=ka.shape&&ka.shape.checkBounds()&&(K.save(),ka.shape.paint(K),K.restore()),ca.appendChild(K.getShapeGeo()),K.endShape(),ca.setAttribute("Type",K.getShapeType()));return ca}return p(H,I,L,N,Q,V)}finally{H.geometry=W}else return null}function x(H,I){var L=mxUtils.createXmlDocument(),N=z(L,M.XMLNS,
"PageContents");N.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns",M.XMLNS);N.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:r",M.XMLNS_R);var Q=z(L,M.XMLNS,"Shapes");N.appendChild(Q);var ha=H.model,V=H.view.translate,T=H.view.scale,W=H.getGraphBounds();K.shiftX=0;K.shiftY=0;if(W.x/T<V.x||W.y/T<V.y)K.shiftX=Math.ceil((V.x-W.x/T)/H.pageFormat.width)*H.pageFormat.width,K.shiftY=Math.ceil((V.y-W.y/T)/H.pageFormat.height)*H.pageFormat.height;K.save();K.translate(-V.x,-V.y);K.scale(1/T);K.newPage();
T=H.model.getChildCells(H.model.root);V={};for(W=0;W<T.length;W++)V[T[W].id]=W;for(var oa in ha.cells)T=ha.cells[oa],W=null!=T.parent?V[T.parent.id]:null,null!=W&&(T=n(T,W,H,L,I.pageHeight),null!=T&&Q.appendChild(T));H=z(L,M.XMLNS,"Connects");N.appendChild(H);for(oa in ha.cells)T=ha.cells[oa],T.edge&&(T.source&&(I=z(L,M.XMLNS,"Connect"),I.setAttribute("FromSheet",B(T.id)),I.setAttribute("FromCell","BeginX"),I.setAttribute("ToSheet",B(T.source.id)),H.appendChild(I)),T.target&&(I=z(L,M.XMLNS,"Connect"),
I.setAttribute("FromSheet",B(T.id)),I.setAttribute("FromCell","EndX"),I.setAttribute("ToSheet",B(T.target.id)),H.appendChild(I)));L.appendChild(N);K.restore();return L}function A(H,I,L,N){H.file(I,(N?"":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>')+mxUtils.getXml(L,"\n"))}function C(H,I,L,N){var Q=mxUtils.createXmlDocument(),ha=mxUtils.createXmlDocument(),V=z(Q,M.XMLNS,"Pages");V.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns",M.XMLNS);V.setAttributeNS("http://www.w3.org/2000/xmlns/",