Quote everything in search terms for body search

This commit is contained in:
Retro_Guy 2021-03-11 23:03:17 -07:00
parent 8c716974d0
commit 39889ea727
1 changed files with 3 additions and 0 deletions

View File

@ -250,6 +250,9 @@ echo $thispage;
function get_body_search($group, $terms) {
GLOBAL $CONFIG, $config_name, $spooldir;
$terms = preg_replace('/"/', '', $terms);
$terms = preg_replace('/\ /', '" "', $terms);
$terms = '"'.$terms.'"';
$local_groupfile=$spooldir."/".$config_name."/local_groups.txt";
$grouplist = file($local_groupfile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
foreach($grouplist as $thisgroup) {