diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2008-09-28 05:24:23 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2008-09-28 05:24:23 +0000 |
commit | bd125eb2505ee1a16a0023f5504faa846565ce10 (patch) | |
tree | 81557aed6eacf00fc40f246226d168e79f7476f2 /usr | |
parent | 5f05c1e8194db6c9ae551bc3c92a40d66390f013 (diff) | |
download | pfsense-bd125eb2505ee1a16a0023f5504faa846565ce10.zip pfsense-bd125eb2505ee1a16a0023f5504faa846565ce10.tar.gz |
Do not encode, AJAX function handles.
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/www/edit.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr/local/www/edit.php b/usr/local/www/edit.php index ebddf3a..7a11f72 100755 --- a/usr/local/www/edit.php +++ b/usr/local/www/edit.php @@ -40,7 +40,7 @@ if($_REQUEST['action']) { } elseif(! is_file($_REQUEST['file'])) { echo "|3|File does not exist or is not a regular file.|"; } else { - $data = file_get_contents($_REQUEST['file']); + $data = file_get_contents(urldecode($_REQUEST['file'])); if($data === false) { echo "|1|Failed to read file.|"; } else { @@ -113,6 +113,7 @@ outputJavaScriptFileInline("filebrowser/browser.js"); else if(file.indexOf(".css") > 0) lang = "css"; if($("highlight").checked && lang != "none") { + alert("highlight"); $("fileContent").className = lang + ":showcolumns"; dp.SyntaxHighlighter.HighlightAll("fileContent", true, false); } @@ -132,7 +133,7 @@ outputJavaScriptFileInline("filebrowser/browser.js"); "<?=$_SERVER['SCRIPT_NAME'];?>", { method: "post", postBody: "action=save&file=" + $("fbTarget").value + - "&data=" + escape($("fileContent").value), + "&data=" + $("fileContent").value, onComplete: function(req) { var values = req.responseText.split("|"); $("fileStatus").innerHTML = values[1]; |