From 1b48a0f4e4c5bc2cacb14a2f6090df3594ef80f0 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Fri, 18 Sep 2020 10:18:27 +0800 Subject: [PATCH] Update common.php --- common.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/common.php b/common.php index 68cf528..9291d38 100644 --- a/common.php +++ b/common.php @@ -1996,7 +1996,7 @@ function render_list($path = '', $files = '') if (strpos(__DIR__, ':')) $slash = '\\'; if (isset($files['children']['index.html']) && !$_SERVER['admin']) { - $htmlcontent = fetch_files(spurlencode(path_format(urldecode($path) . '/index.html'),'/'))['content']; + $htmlcontent = fetch_files(spurlencode(path_format($path . '/index.html'),'/'))['content']; return output($htmlcontent['body'], $htmlcontent['stat']); } $path = str_replace('%20','%2520',$path); @@ -2719,7 +2719,7 @@ function render_list($path = '', $files = '') $html = $tmp[0]; $tmp = splitfirst($tmp[1], ''); if (isset($files['children']['head.omf'])) { - $headomf = str_replace('', fetch_files(spurlencode(path_format(urldecode($path) . '/head.omf'),'/'))['content']['body'], $tmp[0]); + $headomf = str_replace('', fetch_files(spurlencode(path_format($path . '/head.omf'),'/'))['content']['body'], $tmp[0]); } $html .= $headomf . $tmp[1]; @@ -2727,7 +2727,7 @@ function render_list($path = '', $files = '') $html = $tmp[0]; $tmp = splitfirst($tmp[1], ''); if (isset($files['children']['head.md'])) { - $headmd = str_replace('', fetch_files(spurlencode(path_format(urldecode($path) . '/head.md'),'/'))['content']['body'], $tmp[0]); + $headmd = str_replace('', fetch_files(spurlencode(path_format($path . '/head.md'),'/'))['content']['body'], $tmp[0]); $html .= $headmd . $tmp[1]; while (strpos($html, '')) { $html = str_replace('', '', $html); @@ -2760,7 +2760,7 @@ function render_list($path = '', $files = '') $html = $tmp[0]; $tmp = splitfirst($tmp[1], ''); if (isset($files['children']['readme.md'])) { - $Readmemd = str_replace('', fetch_files(spurlencode(path_format(urldecode($path) . '/readme.md'),'/'))['content']['body'], $tmp[0]); + $Readmemd = str_replace('', fetch_files(spurlencode(path_format($path . '/readme.md'),'/'))['content']['body'], $tmp[0]); $html .= $Readmemd . $tmp[1]; while (strpos($html, '')) { $html = str_replace('', '', $html); @@ -2782,7 +2782,7 @@ function render_list($path = '', $files = '') $html = $tmp[0]; $tmp = splitfirst($tmp[1], ''); if (isset($files['children']['foot.omf'])) { - $Footomf = str_replace('', fetch_files(spurlencode(path_format(urldecode($path) . '/foot.omf'),'/'))['content']['body'], $tmp[0]); + $Footomf = str_replace('', fetch_files(spurlencode(path_format($path . '/foot.omf'),'/'))['content']['body'], $tmp[0]); } $html .= $Footomf . $tmp[1];