- Patch from Matt:

"The noise words description says that whitespace and line breaks will be
  stripped out, but the code never does any trimming.  This simple patch strips
  the whitespace from the noise words.  This probably takes care of bug #2804."
4.3.x
Dries Buytaert 2003-09-10 07:56:06 +00:00
parent e406d3054e
commit 9b74d0b83c
2 changed files with 2 additions and 2 deletions

View File

@ -270,7 +270,7 @@ function update_index($search_array) {
// Remove "noisewords"
$noise = explode(",", variable_get("noisewords", ""));
foreach ($noise as $word) {
$wordlist = preg_replace("' $word '", " ", $wordlist);
$wordlist = str_replace(trim($word), " ", $wordlist);
}
// Remove whitespace

View File

@ -270,7 +270,7 @@ function update_index($search_array) {
// Remove "noisewords"
$noise = explode(",", variable_get("noisewords", ""));
foreach ($noise as $word) {
$wordlist = preg_replace("' $word '", " ", $wordlist);
$wordlist = str_replace(trim($word), " ", $wordlist);
}
// Remove whitespace