summaryrefslogtreecommitdiffstats
path: root/usr/local/www/edit.php
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2010-06-17 10:27:01 -0400
committerjim-p <jimp@pfsense.org>2010-06-17 10:28:32 -0400
commit1fa00d6d70b9891c89c76edd6ff6be4bb8968b9e (patch)
tree66a24bf603d6f7c95c32dbdabb59738da19893e8 /usr/local/www/edit.php
parent88e9bceb8af37e8ea808f72327f5c78e9e746906 (diff)
downloadpfsense-1fa00d6d70b9891c89c76edd6ff6be4bb8968b9e.zip
pfsense-1fa00d6d70b9891c89c76edd6ff6be4bb8968b9e.tar.gz
Strip windows carriage return (^M) on save. IE adds this, and it can break certain files that don't expect to deal with it.
Diffstat (limited to 'usr/local/www/edit.php')
-rw-r--r--usr/local/www/edit.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/usr/local/www/edit.php b/usr/local/www/edit.php
index 2c780b6..817c00f 100644
--- a/usr/local/www/edit.php
+++ b/usr/local/www/edit.php
@@ -56,6 +56,7 @@ if($_REQUEST['action']) {
echo "|No file name specified.|";
} else {
conf_mount_rw();
+ $_REQUEST['data'] = str_replace("\r", "", $_REQUEST['data']);
$ret = file_put_contents($_REQUEST['file'], $_REQUEST['data']);
conf_mount_ro();
if($_REQUEST['file'] == "config.xml")
OpenPOWER on IntegriCloud