Don't URL encode directory separator

This commit is contained in:
Les De Ridder 2017-02-17 02:11:24 +01:00
parent 790256de77
commit 47e93a3b2f
No known key found for this signature in database
GPG Key ID: 5EC132DFA85DB372
1 changed files with 2 additions and 2 deletions

View File

@ -46,11 +46,11 @@ function save_file ($file, $name, $arg, $type){
move_uploaded_file($file,CONFIG_FILES_PATH.$file_name);
//Check if html or plain text should be returned
if($type==='tool'){
echo CONFIG_ROOT_URL.'/'.urlencode($file_name);
echo CONFIG_ROOT_URL.'/'.str_replace('%2F', '/', urlencode($file_name));
exit(0);
}elseif($type==='normal'){
//Return url+filename to the user (HTML)
$n=urlencode($file_name);
$n=str_replace('%2F', '/', urlencode($file_name));
include_once(CONFIG_ROOT_PATH.'upload-done.php');
exit(0);
}