diff --git a/src/Actions.php b/src/Actions.php index e7ab70e6..2ac470ad 100644 --- a/src/Actions.php +++ b/src/Actions.php @@ -94,7 +94,7 @@ public function maybe_register_assets() { $data = wp_json_encode( [ 'props' => [ - 'search_query' => get_search_query(), + 'search_query' => trim(get_search_query()), 'result_count' => $wp_query->found_posts, ], ]