diff --git a/plugins/views_data_export_plugin_display_export.inc b/plugins/views_data_export_plugin_display_export.inc
index a216ebd..c49572d 100644
--- a/plugins/views_data_export_plugin_display_export.inc
+++ b/plugins/views_data_export_plugin_display_export.inc
@@ -307,8 +307,12 @@ class views_data_export_plugin_display_export extends views_plugin_display_feed
     $querystring = array(
       'eid' => $this->batched_execution_state->eid,
     );
+    // If a return-url was directly passed, grab that for the final URL.
+    if (isset($_GET['return-url'])) {
+      $querystring['return-url'] = $_GET['return-url'] ? $_GET['return-url'] : NULL;
+    }
     // If we were attached to another view, grab that for the final URL.
-    if (!empty($_GET['attach']) && isset($this->view->display[$_GET['attach']])) {
+    elseif (!empty($_GET['attach']) && isset($this->view->display[$_GET['attach']])) {
       // Get the path of the attached display:
       $querystring['return-url'] = $this->view->get_url(NULL, $this->view->display[$_GET['attach']]->handler->get_path());
     }
