diff --git a/core/modules/views/src/Controller/ViewAjaxController.php b/core/modules/views/src/Controller/ViewAjaxController.php
index bd2f3c1..f1aedd0 100644
--- a/core/modules/views/src/Controller/ViewAjaxController.php
+++ b/core/modules/views/src/Controller/ViewAjaxController.php
@@ -161,7 +161,13 @@ public function ajaxView(Request $request) {
         // Overwrite the destination.
         // @see the redirect.destination service.
         $origin_destination = $path;
-        $query = UrlHelper::buildQuery($request->query->all());
+
+        // Remove some special parameters you never want to have part of
+        $used_query_parameters = $request->query->all();
+        // destination query.
+        unset($used_query_parameters['_wrapper_format'], $used_query_parameters['ajax_page_state']);
+
+        $query = UrlHelper::buildQuery($used_query_parameters);
         if ($query != '') {
           $origin_destination .= '?' . $query;
         }
diff --git a/core/modules/views/tests/src/Unit/Controller/ViewAjaxControllerTest.php b/core/modules/views/tests/src/Unit/Controller/ViewAjaxControllerTest.php
index 9c4ce81..9e1f96f 100644
--- a/core/modules/views/tests/src/Unit/Controller/ViewAjaxControllerTest.php
+++ b/core/modules/views/tests/src/Unit/Controller/ViewAjaxControllerTest.php
@@ -185,6 +185,10 @@ public function testAjaxView() {
     $request = new Request();
     $request->request->set('view_name', 'test_view');
     $request->request->set('view_display_id', 'page_1');
+    $request->request->set('view_path', '/test-page');
+    $request->request->set('_wrapper_format', 'ajax');
+    $request->request->set('ajax_page_state', 'drupal.settings[]');
+    $request->request->set('type', 'article');
 
     list($view, $executable) = $this->setupValidMocks();
 
@@ -205,6 +209,10 @@ public function testAjaxView() {
 
     $executable->displayHandlers = $display_collection;
 
+    $this->redirectDestination->expects($this->atLeastOnce())
+      ->method('set')
+      ->with('/test-page?type=article');
+
     $response = $this->viewAjaxController->ajaxView($request);
     $this->assertTrue($response instanceof ViewAjaxResponse);
 
