summaryrefslogtreecommitdiffstats
path: root/usr/local
diff options
context:
space:
mode:
Diffstat (limited to 'usr/local')
-rw-r--r--usr/local/www/edit.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr/local/www/edit.php b/usr/local/www/edit.php
index a87dfa4..84d366e 100644
--- a/usr/local/www/edit.php
+++ b/usr/local/www/edit.php
@@ -53,6 +53,7 @@ if($_POST['action']) {
if($data === false) {
echo "|1|" . gettext("Failed to read file") . ".|";
} else {
+ $data = base64_encode($data);
echo "|0|{$_POST['file']}|{$data}|";
}
}
@@ -114,8 +115,9 @@ outputJavaScriptFileInline("javascript/base64.js");
if(values.shift() == "0") {
var file = values.shift();
+ var fileContent = Base64.decode(values.join("|"));
$("fileStatus").innerHTML = "<?=gettext("File successfully loaded"); ?>.";
- $("fileContent").value = values.join("|");
+ $("fileContent").value = fileContent;
var lang = "none";
if(file.indexOf(".php") > 0) lang = "php";
OpenPOWER on IntegriCloud