From cd0894ddefbc9c0be2d59b9160fc911e16b67bd2 Mon Sep 17 00:00:00 2001 From: dweller Date: Mon, 26 Feb 2024 19:58:13 +0200 Subject: remove unnecessary urldecode from common query args, PHP does it for me, fixes apropos links with non-alphanum chars --- common.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/common.php b/common.php index 1f6e51c..370141d 100644 --- a/common.php +++ b/common.php @@ -10,7 +10,17 @@ $root = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST']; $manpath = "/usr/share/man"; - $action = trim(urldecode($_GET['action'] ?? null)); - $query = trim(urldecode($_GET['query'] ?? null)); - $section = trim(urldecode($_GET['section'] ?? null)); + $action = trim($_GET['action'] ?? null); + $query = trim($_GET['query'] ?? null); + $section = trim($_GET['section'] ?? null); + + + /* + function dbg_print($data) + { + $output = $data; + if(is_array($output)) $output = implode(',', $output); + echo ""; + } + */ ?> -- cgit v1.2.3