From 21ef12f143e37eb82a56d56715ff2b01f24065a1 Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Fri, 14 Sep 2012 17:48:16 +0100 Subject: [PATCH] URI encoding var with ICEcoder: prefix Don't need cM anymore Replace apostrophes with HTML entity value If we have something that should be URI encoded, encode it but also with an ICEcoder: prefix, so we know we need to unencode it --- lib/coder.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/coder.js b/lib/coder.js index 2d4ba29..dd69db3 100644 --- a/lib/coder.js +++ b/lib/coder.js @@ -70,7 +70,7 @@ var ICEcoder = { // Set our layout according to the browser size setLayout: function(dontSetEditor) { - var winW, winH, headerH, footerH, accountH, tabsBarH, findBarH, cM; + var winW, winH, headerH, footerH, accountH, tabsBarH, findBarH; // Determin width & height available winW = window.innerWidth ? window.innerWidth : document.body.clientWidth; @@ -1055,6 +1055,8 @@ var ICEcoder = { if (document.findAndReplace.target.value.indexOf("file")>=0) { targetQS = "&target="+document.findAndReplace.target.value.replace(/ /g,"-"); } + find = find.replace(/\'/g, '''); + find != encodeURIComponent(find) ? find = 'ICEcoder:'+encodeURIComponent(find) : find; top.document.getElementById('mediaContainer').innerHTML = ''; } }