From 69d8ddce7756802525bc07ac028b939e554a81ca Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Tue, 22 Apr 2014 09:25:18 +0100 Subject: [PATCH] Need to target on top.ICEcoder.xssClean --- lib/ice-coder.js | 2 +- lib/ice-coder.min.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/ice-coder.js b/lib/ice-coder.js index b3598d6..f960d3d 100644 --- a/lib/ice-coder.js +++ b/lib/ice-coder.js @@ -1425,7 +1425,7 @@ var ICEcoder = { serverMessage = top.get('serverMessage'); if (message) { - serverMessage.innerHTML = xssClean(message); + serverMessage.innerHTML = top.ICEcoder.xssClean(message); serverMessage.style.left = "0"; } else { setTimeout(function() {serverMessage.style.left = "2000px";},200); diff --git a/lib/ice-coder.min.js b/lib/ice-coder.min.js index 1d1dcc4..41e2de8 100644 --- a/lib/ice-coder.min.js +++ b/lib/ice-coder.min.js @@ -59,9 +59,9 @@ c=a.getCursor().ch;for(var e=d=0;e=a||10<=a)&&top.ICEcoder.mouseX>parseInt(top.ICEcoder.files.style.width,10)&&(top.ICEcoder.tabDragMouseX=top.ICEcoder.mouseX- parseInt(top.ICEcoder.files.style.width,10)-top.ICEcoder.tabDragMouseXStart,top.ICEcoder.tabDragMove());if(top.ICEcoder.ready&&(top.ICEcoder.mouseDown||(top.ICEcoder.draggingFilesW=!1),a=!ICEcoder.draggingTab&&(top.ICEcoder.mouseX>top.ICEcoder.filesW-7&&top.ICEcoder.mouseXd.index+d[0].length;);(b=top.get("content").contentWindow.document.getElementById("cssColor"))&& -b.parentNode.removeChild(b);top.ICEcoder.codeAssist&&"CSS"==top.ICEcoder.caretLocType&&(b=top.document.createElement("div"),b.id="cssColor",b.style.position="absolute",b.style.display="block",b.style.width=b.style.height="20px",b.style.zIndex="1000",b.style.background=d?d[0]:"",b.style.cursor="pointer",b.onclick=function(){top.ICEcoder.showColorPicker(d[0])},""==b.style.backgroundColor&&(b.style.display="none"),top.get("header").appendChild(b),a.addWidget(a.getCursor(),top.get("cssColor"),!0))}}, -showColorPicker:function(a){top.get("blackMask").style.visibility="visible";top.get("mediaContainer").innerHTML='



'; +a;if(b=top.ICEcoder.filesFrame.contentWindow.document.body)b.style.cursor=a}},serverMessage:function(a){var b;b=top.get("serverMessage");a?(b.innerHTML=top.ICEcoder.xssClean(a),b.style.left="0"):setTimeout(function(){b.style.left="2000px"},200);b.style.opacity=a?1:0},cssColorPreview:function(){var a,b,c,d;if(a=ICEcoder.getcMInstance()){b=a.getLine(a.getCursor().line);for(c=/(#[\da-f]{3}(?:[\da-f]{3})?\b|\b(?:rgb|hsl)a?\([\s\d%,.-]+\)|\b[a-z]+\b)/gi;(d=c.exec(b))&&a.getCursor().ch>d.index+d[0].length;); +(b=top.get("content").contentWindow.document.getElementById("cssColor"))&&b.parentNode.removeChild(b);top.ICEcoder.codeAssist&&"CSS"==top.ICEcoder.caretLocType&&(b=top.document.createElement("div"),b.id="cssColor",b.style.position="absolute",b.style.display="block",b.style.width=b.style.height="20px",b.style.zIndex="1000",b.style.background=d?d[0]:"",b.style.cursor="pointer",b.onclick=function(){top.ICEcoder.showColorPicker(d[0])},""==b.style.backgroundColor&&(b.style.display="none"),top.get("header").appendChild(b), +a.addWidget(a.getCursor(),top.get("cssColor"),!0))}},showColorPicker:function(a){top.get("blackMask").style.visibility="visible";top.get("mediaContainer").innerHTML='



'; farbtastic("picker","color");a&&top.get("picker").farbtastic.setColor(a)},drawCanvasImage:function(a){var b,c,d,e,f,g,m,h,k,n,p;b=top.get("canvasPicker").getContext("2d");c=new Image;c.src=a.src;c.onload=function(){top.get("canvasPicker").width=a.width;top.get("canvasPicker").height=a.height;b.drawImage(c,0,0,a.width,a.height)};top.get("canvasPicker").onmousemove=function(a){d=a.pageX-this.offsetLeft;e=a.pageY-this.offsetTop;f=b.getImageData(d,e,1,1).data;g=f[0];m=f[1];h=f[2];k=g+","+m+","+h;n=top.ICEcoder.rgbToHex(g, m,h);top.get("rgbMouseXY").value=k;top.get("hexMouseXY").value="#"+n;top.get("hexMouseXY").style.backgroundColor=top.get("rgbMouseXY").style.backgroundColor="#"+n;p=128>g||128>m||128>h&&200>g&&200>m&&50