Commit 9b74d0b8 authored by Dries's avatar Dries

- 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."
parent e406d305
......@@ -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
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment