Get file value from request and decode

file value now can be received from POST or GET (REQUEST), as we will be
passing in POST via XHR in future
html_entity_decode the value so we can have special chars
This commit is contained in:
Matt Pass
2014-11-14 11:35:31 +00:00
parent 2d45e6e297
commit 4a23fe12a3

View File

@@ -16,9 +16,12 @@ $saveType = isset($_GET['saveType']) ? strClean($_GET['saveType']) : "";
$file = str_replace("|","/",strClean(
isset($_POST['newFileName']) && $_POST['newFileName']!=""
? $_POST['newFileName']
: $_GET['file']
: $_REQUEST['file']
));
// Establish the actual name as we may have HTML entities in filename
$file = html_entity_decode($file);
// Put the original $file var aside for use
$fileOrig = $file;