Skip to content
Snippets Groups Projects
Commit 2462ce1d authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

limited allowed range of characters for stopwords

parent b46708cb
No related branches found
No related tags found
3 merge requests!1895Development,!1797Development,!1795Resolve "extend the message for excluding search"
...@@ -1358,7 +1358,7 @@ class MetaGer ...@@ -1358,7 +1358,7 @@ class MetaGer
$words = preg_split("/\s+/si", $tmp); $words = preg_split("/\s+/si", $tmp);
$newQ = $this->q; $newQ = $this->q;
foreach ($words as $word) { foreach ($words as $word) {
if (strpos($word, "-") === 0 && strlen($word) > 1) { if(preg_match("/^-[a-zA-Z0-9]/", $word)){
$this->stopWords[] = substr($word, 1); $this->stopWords[] = substr($word, 1);
$newQ = str_ireplace($word, "", $newQ); $newQ = str_ireplace($word, "", $newQ);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment