diff --git a/inc/indexer.php b/inc/indexer.php index 1f00948765734487f5545ce48b237c07d810774e..546b2a288cd643d77e2898c5752657f0190dc54b 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -444,9 +444,12 @@ class Doku_Indexer { $text = utf8_stripspecials($text, ' ', '\._\-:'.$wc); $wordlist = explode(' ', $text); - foreach ($wordlist as $i => &$word) { - $word = (preg_match('/[^0-9A-Za-z]/u', $word)) ? + foreach ($wordlist as $i => $word) { + $wordlist[$i] = (preg_match('/[^0-9A-Za-z]/u', $word)) ? utf8_strtolower($word) : strtolower($word); + } + + foreach ($wordlist as $i => $word) { if ((!is_numeric($word) && strlen($word) < IDX_MINWORDLENGTH) || array_search($word, $stopwords) !== false) unset($wordlist[$i]);