FilterEditor: Also trim trailing whitespace from search values

Simple values are wrapped with `*` anyway, so trimming all
whitespace doesn't pose an issue. (Even if inserted intentionally)
This doesn't apply to qualified search values. (e.g. `host = abc `)

resolves #4002
This commit is contained in:
Johannes Meyer 2019-11-21 07:57:40 +01:00
parent 1755c01390
commit 9b1dc44130
1 changed files with 1 additions and 1 deletions

View File

@ -274,7 +274,7 @@ class FilterEditor extends AbstractWidget
$filter = Filter::matchAll();
}
$filters = array();
$search = ltrim($search);
$search = trim($search);
foreach ($this->searchColumns as $searchColumn) {
$filters[] = Filter::expression($searchColumn, '=', "*$search*");
}