Fixed php8 deprecation for htmlspecialchars (#fixes 266)

This commit is contained in:
Dirk Bauer authored and Andrew Ruthven committed 2022-07-12 03:25:15 +00:00
1 parent 6cf8d5f81d
commit b3b2ccc6c0
1 file changed
+3 -1
+3 -1
View File
@@ -44,7 +44,9 @@ function clean_get() {
// relies on variables that are easily manipulated by the user. These lines and functions filter all those variables.
if(isset($_POST)) array_walk($_POST, 'filter_post');
$_GET = clean_get();
$_SERVER['REQUEST_URI'] = str_replace("&", "&", htmlspecialchars($_SERVER['REQUEST_URI']));
if (isset($_SERVER['REQUEST_URI'])) {
$_SERVER['REQUEST_URI'] = str_replace("&", "&", htmlspecialchars($_SERVER['REQUEST_URI']));
}
if (isset($_SERVER['HTTP_REFERER'])) {
$_SERVER['HTTP_REFERER'] = htmlspecialchars(@$_SERVER['HTTP_REFERER']);
}