diff --git a/src/JacobBennett/Pjax/PjaxMiddleware.php b/src/JacobBennett/Pjax/PjaxMiddleware.php index fcd9f38..44c61af 100644 --- a/src/JacobBennett/Pjax/PjaxMiddleware.php +++ b/src/JacobBennett/Pjax/PjaxMiddleware.php @@ -41,7 +41,7 @@ public function handle($request, Closure $next) } // Set new content for the response - $response->setContent($title . $response_container->html()); + $response->setContent($title . $response_container->getNode(0)->ownerDocument->saveHTML($response_container->getNode(0))); } // Updating address bar with the last URL in case there were redirects