index : website | |
Archlinux32 website - obsolete | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2019-03-19 13:57:57 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-03-19 13:57:57 +0100 |
commit | 20ce345c1dc2905878ec1a9828a75813a63cfbd3 (patch) | |
tree | 72666fb056b966653ad70e2d30fb5f986ff3e330 | |
parent | 748e207978b69f854f7c69c9d4981b4b20b55856 (diff) |
-rw-r--r-- | init.php | 12 |
@@ -6,14 +6,20 @@ while ($old != $_SERVER['QUERY_STRING']) { $old = $_SERVER['QUERY_STRING']; $_SERVER['QUERY_STRING'] = urldecode($_SERVER['QUERY_STRING']); } -$_SERVER['QUERY_STRING'] = htmlentities($_SERVER['QUERY_STRING']); +$_SERVER['QUERY_STRING'] = + str_replace('&', '&', + htmlspecialchars($_SERVER['QUERY_STRING']) + ); $old = ''; while ($old != $_SERVER['REQUEST_URI']) { $old = $_SERVER['REQUEST_URI']; $_SERVER['REQUEST_URI'] = urldecode($_SERVER['REQUEST_URI']); } -$_SERVER['REQUEST_URI'] = htmlentities($_SERVER['REQUEST_URI']); +$_SERVER['REQUEST_URI'] = + str_replace('&', '&', + htmlspecialchars($_SERVER['REQUEST_URI']) + ); foreach ($_GET as $key => $val) { $old = ''; @@ -21,5 +27,5 @@ foreach ($_GET as $key => $val) { $old = $_GET[$key]; $_GET[$key] = urldecode($_GET[$key]); } - $_GET[$key] = htmlentities($_GET[$key]); + $_GET[$key] = htmlspecialchars($_GET[$key]); } |