mirror of https://github.com/wallabag/wallabag.git
Enforce lowercase on domain name filter
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
This commit is contained in:
parent
ebe50a85fb
commit
00fc2b44f4
|
@ -90,7 +90,7 @@ class EntryFilterType extends AbstractType
|
|||
if (strlen($value) <= 2 || empty($value)) {
|
||||
return;
|
||||
}
|
||||
$expression = $filterQuery->getExpr()->like($field, $filterQuery->getExpr()->literal('%'.$value.'%'));
|
||||
$expression = $filterQuery->getExpr()->like($field, $filterQuery->getExpr()->lower($filterQuery->getExpr()->literal('%'.$value.'%')));
|
||||
|
||||
return $filterQuery->createCondition($expression);
|
||||
},
|
||||
|
|
|
@ -725,6 +725,15 @@ class EntryControllerTest extends WallabagCoreTestCase
|
|||
$crawler = $client->submit($form, $data);
|
||||
$this->assertCount(5, $crawler->filter('div[class=entry]'));
|
||||
|
||||
$crawler = $client->request('GET', '/unread/list');
|
||||
$form = $crawler->filter('button[id=submit-filter]')->form();
|
||||
$data = [
|
||||
'entry_filter[domainName]' => 'dOmain',
|
||||
];
|
||||
|
||||
$crawler = $client->submit($form, $data);
|
||||
$this->assertCount(5, $crawler->filter('div[class=entry]'));
|
||||
|
||||
$form = $crawler->filter('button[id=submit-filter]')->form();
|
||||
$data = [
|
||||
'entry_filter[domainName]' => 'wallabag',
|
||||
|
|
Loading…
Reference in New Issue