Skip to content

Commit 3d78de8

Browse files
authored
Merge pull request #230 from pau1phi11ips/patch-1
Convert queries to lowercase and remove trailing whitespace
2 parents deed8ae + 4e5b9ac commit 3d78de8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Actions.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ public function maybe_register_assets() {
9494
$data = wp_json_encode(
9595
[
9696
'props' => [
97-
'search_query' => trim(get_search_query()),
97+
// convert queries to lowercase and remove trailing whitespace to ensure same terms are grouped together
98+
'search_query' => strtolower(trim(get_search_query())),
9899
'result_count' => $wp_query->found_posts,
99100
],
100101
]

0 commit comments

Comments
 (0)