Improved search keyword highlighting
authorMarcel Werk <burntime@woltlab.com>
Wed, 14 Oct 2015 13:00:29 +0000 (15:00 +0200)
committerMarcel Werk <burntime@woltlab.com>
Wed, 14 Oct 2015 13:00:29 +0000 (15:00 +0200)
wcfsetup/install/files/lib/system/bbcode/KeywordHighlighter.class.php

index 90020040a38793c581b9a804fdada185c8755a8d..c9ea142c88df26a20aa1370ac365d9e7629c5e89 100644 (file)
@@ -103,7 +103,7 @@ class KeywordHighlighter extends SingletonFactory {
                $keywordString = preg_replace('/(?<!\w)\*/', '', $keywordString);
                
                // remove search operators
-               $keywordString = preg_replace('/[\+\-><()~]+/', '', $keywordString);
+               $keywordString = preg_replace('/[\+\-><()~]+/', ' ', $keywordString);
                
                if (mb_substr($keywordString, 0, 1) == '"' && mb_substr($keywordString, -1) == '"') {
                        // phrases search