Skip to content

Commit 1ba5a2d

Browse files
committed
Allow arbitrary search regex
Closes #492.
1 parent 7cfb405 commit 1ba5a2d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apc.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ function defaults($d,$v) {
8787
'SORT1' => '/^[AHSMCDTZ]$/', // first sort key
8888
'SORT2' => '/^[DA]$/', // second sort key
8989
'AGGR' => '/^\d+$/', // aggregation by dir level
90-
'SEARCH' => '~^[a-zA-Z0-9/_.-]*$~' // aggregation by dir level
90+
'SEARCH' => '/^.*$/' // search regex
9191
);
9292

9393
// cache scope
@@ -961,7 +961,7 @@ function block_sort($array1, $array2)
961961
'<option value=500',$MYREQUEST['COUNT']=='500'? ' selected':'','>Top 500</option>',
962962
'<option value=0 ',$MYREQUEST['COUNT']=='0' ? ' selected':'','>All</option>',
963963
'</select>',
964-
'&nbsp; Search: <input name=SEARCH value="',$MYREQUEST['SEARCH'],'" type=text size=25/>',
964+
'&nbsp; Search: <input name=SEARCH value="',isset($MYREQUEST['SEARCH']) ? htmlspecialchars($MYREQUEST['SEARCH']) : '','" type=text size=25/>',
965965
'&nbsp;<input type=submit value="GO!">',
966966
'</form></div>';
967967

0 commit comments

Comments
 (0)