diff --git a/common.php b/common.php index 0420532..361cea4 100644 --- a/common.php +++ b/common.php @@ -692,6 +692,7 @@ function comppass($pass) function encode_str_replace($str) { + $str = str_replace('%','%25',$str); $str = str_replace('&','&',$str); $str = str_replace('+','%2B',$str); $str = str_replace('#','%23',$str); @@ -2037,7 +2038,8 @@ function render_list($path = '', $files = []) if ($_SERVER['admin'] or !isHideFile($file['name'])) { $filenum++; $ext = strtolower(substr($file['name'], strrpos($file['name'], '.') + 1)); - $FolderListStr = str_replace('', path_format($_SERVER['base_disk_path'] . '/' . $path . '/' . encode_str_replace($file['name'])), $FolderList); + $FolderListStr = $FolderList; + while (strpos($FolderListStr, '')) $FolderListStr = str_replace('', path_format($_SERVER['base_disk_path'] . '/' . $path . '/' . encode_str_replace($file['name'])), $FolderListStr); $FolderListStr = str_replace('', $ext, $FolderListStr); if (in_array($ext, $exts['music'])) $FolderListStr = str_replace('', 'audio', $FolderListStr); elseif (in_array($ext, $exts['video'])) $FolderListStr = str_replace('', 'iframe', $FolderListStr);