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
This commit is contained in:
Matt Pass
2012-09-14 17:48:16 +01:00
parent 6cf1def982
commit 21ef12f143

View File

@@ -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 = '<iframe src="lib/multiple-results.php?find='+find+replaceQS+targetQS+'" class="whiteGlow" style="width: 700px; height: 500px"></iframe>';
}
}