short fix back link when spacialChar

pull/493/head
qkqpttgf 2021-11-26 14:54:39 +08:00 committed by GitHub
parent e6abbc6086
commit 6383864bb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 11 deletions

View File

@ -1396,19 +1396,10 @@ function EnvOpt($needUpdate = 0)
} }
} else return message('please login again', 'Need login', 403); } else return message('please login again', 'Need login', 403);
if (isset($_GET['preview'])) {
$preurl = $_SERVER['PHP_SELF'] . '?preview';
} else {
$preurl = path_format($_SERVER['PHP_SELF'] . '/');
}
$html .= ' $html .= '
<a id="back" href="">' . getconstStr('Back') . '</a><br> <a id="back" href="./">' . getconstStr('Back') . '</a><br>
<script> <script>
var url = location.href; if (location.search.indexOf("preview")>0) document.getElementById("back").href = "?preview";
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> </script>
'; ';
if ($_GET['setup']==='cmd') { if ($_GET['setup']==='cmd') {