From af90ff91f7de67059d3bdd9c89d2372a5e794d8f Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Tue, 16 Nov 2021 11:24:28 +0800 Subject: [PATCH] fix ' in path cause js error --- common.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.php b/common.php index a2723a1..672438d 100644 --- a/common.php +++ b/common.php @@ -2559,7 +2559,7 @@ function render_list($path = '', $files = []) while (strpos($html, '')) $html = str_replace('', (substr($_SERVER['base_disk_path'],-1)=='/'?substr($_SERVER['base_disk_path'],0,-1):$_SERVER['base_disk_path']), $html); while (strpos($html, '')) $html = str_replace('', $_SERVER['base_path'], $html); - while (strpos($html, '')) $html = str_replace('', str_replace('%23', '#', str_replace('&','&', path_format($path1.'/'))), $html); + $html = str_replace('', str_replace('\'', '\\\'', str_replace('%23', '#', str_replace('&','&', path_format($path1.'/')))), $html); while (strpos($html, '')) $html = str_replace('', getconstStr('Home'), $html); $html = str_replace('', getConfig('customCss'), $html);