summaryrefslogtreecommitdiffstats
path: root/usr/local/www/edit.php
diff options
context:
space:
mode:
Diffstat (limited to 'usr/local/www/edit.php')
-rw-r--r--[-rwxr-xr-x]usr/local/www/edit.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr/local/www/edit.php b/usr/local/www/edit.php
index 32d2b2f..e820dac 100755..100644
--- a/usr/local/www/edit.php
+++ b/usr/local/www/edit.php
@@ -124,12 +124,15 @@ outputJavaScriptFileInline("filebrowser/browser.js");
function saveFile(file) {
$("fileStatus").innerHTML = "Saving file ...";
Effect.Appear("fileStatusBox", { duration: 0.5 });
-
+
+ var fileContent = escape($("fileContent").value);
+ fileContent = fileContent.replace(/\+/g,"%2B");
+
new Ajax.Request(
"<?=$_SERVER['SCRIPT_NAME'];?>", {
method: "post",
postBody: "action=save&file=" + $("fbTarget").value +
- "&data=" + $("fileContent").value,
+ "&data=" + fileContent,
onComplete: function(req) {
var values = req.responseText.split("|");
$("fileStatus").innerHTML = values[1];
OpenPOWER on IntegriCloud