Handle Parentheses in Filter

This commit is contained in:
seiichiro 2022-01-10 15:23:49 +01:00
parent 6619c3d52c
commit 21616f4dfb

View file

@ -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'];
}
}