fix back link with spacialChar

pull/493/head
qkqpttgf 2021-11-26 09:46:25 +08:00 committed by GitHub
parent 340c84ef76
commit e6abbc6086
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -1402,7 +1402,14 @@ function EnvOpt($needUpdate = 0)
$preurl = path_format($_SERVER['PHP_SELF'] . '/'); $preurl = path_format($_SERVER['PHP_SELF'] . '/');
} }
$html .= ' $html .= '
<a href="' . $preurl . '">' . getconstStr('Back') . '</a><br> <a id="back" href="">' . getconstStr('Back') . '</a><br>
<script>
var url = location.href;
var search = location.search;
url = url.substr(0, url.length-search.length);
if (search.indexOf("preview")>0) url += "?preview";
document.getElementById("back").href = url;
</script>
'; ';
if ($_GET['setup']==='cmd') { if ($_GET['setup']==='cmd') {
$statusCode = 200; $statusCode = 200;