Remove \' from search terms

This commit is contained in:
Retro_Guy 2021-03-19 02:10:55 -07:00
parent b95dcb5a00
commit 1cd178646b
1 changed files with 3 additions and 2 deletions

View File

@ -262,10 +262,11 @@ echo $thispage;
function get_body_search($group, $terms) {
GLOBAL $CONFIG, $config_name, $spooldir, $snippet_size;
$terms = preg_replace("/'/", ' ', $terms);
$terms = trim($terms);
if($terms[0] !== '"' && substr($terms, -1) !== '"') {
if($terms[0] !== '"' || substr($terms, -1) !== '"') {
$terms = preg_replace('/"/', '', $terms);
$terms = preg_replace('/\ /', '" "', $terms);
$terms = preg_replace("/\ /", '" "', $terms);
$terms = preg_replace('/"NEAR"/', 'NEAR', $terms);
$terms = preg_replace('/"AND"/', 'AND', $terms);
$terms = preg_replace('/"OR"/', 'OR', $terms);