Skip to content

Commit

Permalink
Merge pull request #230 from pau1phi11ips/patch-1
Browse files Browse the repository at this point in the history
Convert queries to lowercase and remove trailing whitespace
  • Loading branch information
Dan0sz authored Nov 19, 2024
2 parents deed8ae + 4e5b9ac commit 3d78de8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Actions.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ public function maybe_register_assets() {
$data = wp_json_encode(
[
'props' => [
'search_query' => trim(get_search_query()),
// convert queries to lowercase and remove trailing whitespace to ensure same terms are grouped together
'search_query' => strtolower(trim(get_search_query())),
'result_count' => $wp_query->found_posts,
],
]
Expand Down

0 comments on commit 3d78de8

Please sign in to comment.