diff --git a/lib/ice-coder.js b/lib/ice-coder.js
index 48e1daf..0fae1d1 100644
--- a/lib/ice-coder.js
+++ b/lib/ice-coder.js
@@ -1178,7 +1178,7 @@ var ICEcoder = {
: "|[NEW]";
}
filePath = filePath.replace("||","|");
- top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=save&file="+filePath+"&fileMDT="+ICEcoder.openFileMDTs[ICEcoder.selectedTab-1]+"&saveType="+saveType+"&csrf="+top.ICEcoder.csrf);
+ top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=save&fileMDT="+ICEcoder.openFileMDTs[ICEcoder.selectedTab-1]+"&saveType="+saveType+"&csrf="+top.ICEcoder.csrf,decodeURIComponent(filePath));
top.ICEcoder.serverMessage(''+top.t['Saving']+'
'+ICEcoder.openFiles[ICEcoder.selectedTab-1].replace(top.iceRoot,""));
},
@@ -2023,7 +2023,7 @@ var ICEcoder = {
},
// Queue items up for processing in turn
- serverQueue: function(action,item) {
+ serverQueue: function(action,item,file) {
var cM, nextSaveID, txtArea, topSaveID, element, xhr, statusObj, timeStart;
cM = ICEcoder.getcMInstance();
@@ -2084,7 +2084,7 @@ var ICEcoder = {
xhr.open("POST",ICEcoder.serverQueueItems[0],true);
xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
timeStart = new Date().getTime();
- xhr.send('timeStart='+timeStart+'&contents='+encodeURIComponent(top.document.getElementById('saveTemp1').value));
+ xhr.send('timeStart='+timeStart+'&file='+file+'&contents='+encodeURIComponent(top.document.getElementById('saveTemp1').value));
} else {
setTimeout(function() {top.ICEcoder.filesFrame.contentWindow.frames['fileControl'].location.href=ICEcoder.serverQueueItems[0]},1);
}