From 21616f4dfb016b3368ab4d9d953740c1218d4977 Mon Sep 17 00:00:00 2001 From: Stefan Brand Date: Mon, 10 Jan 2022 15:23:49 +0100 Subject: [PATCH] Handle Parentheses in Filter --- index.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index 45cd99b..78701a4 100644 --- a/index.php +++ b/index.php @@ -44,7 +44,9 @@ if (isset($_SESSION['files']) $filter=''; if (isset($_GET['f'])) { if ($_GET['f'] != '') { - $files = array_values(preg_grep('/.*'.$_GET['f'].'.*/i', $files)); + $t = array('('=> '\(', ')' => '\)'); + $f = strtr($_GET['f'], $t); + $files = array_values(preg_grep('/.*'.$f.'.*/i', $files)); $filter='&f='.$_GET['f']; } }