Loading core/modules/big_pipe/src/Render/BigPipe.php +1 −1 Original line number Diff line number Diff line Loading @@ -250,7 +250,7 @@ public function sendContent(BigPipeResponse $response) { // that strings in inline JavaScript or CDATA sections aren't used instead. $parts = explode('</body>', $content); $post_body = array_pop($parts); $pre_body = implode('', $parts); $pre_body = implode('</body>', $parts); $this->sendPreBody($pre_body, $nojs_placeholders, $cumulative_assets); $this->sendPlaceholders($placeholders, $this->getPlaceholderOrder($pre_body, $placeholders), $cumulative_assets); Loading core/modules/big_pipe/tests/src/FunctionalJavascript/BigPipeRegressionTest.php +5 −2 Original line number Diff line number Diff line Loading @@ -54,10 +54,10 @@ public function testMultipleClosingBodies_2678662(): void { $this->drupalGet(Url::fromRoute('big_pipe_regression_test.2678662')); // Confirm that AJAX behaviors were instantiated, if not, this points to a // JavaScript syntax error. // JavaScript syntax error and the JS variable has the appropriate content. $javascript = <<<JS (function(){ return Object.keys(Drupal.ajax.instances).length > 0; return Object.keys(Drupal.ajax.instances).length > 0 && hitsTheFloor === "</body>"; }()) JS; $this->assertJsCondition($javascript); Loading @@ -73,6 +73,9 @@ public function testMultipleClosingBodies_2678662(): void { // in an inline script. $this->assertSession() ->responseNotContains($js_code_until_closing_body_tag . "\n" . BigPipe::START_SIGNAL); // But the inline script itself should not be altered. $this->assertSession() ->responseContains(BigPipeRegressionTestController::MARKER_2678662); } /** Loading Loading
core/modules/big_pipe/src/Render/BigPipe.php +1 −1 Original line number Diff line number Diff line Loading @@ -250,7 +250,7 @@ public function sendContent(BigPipeResponse $response) { // that strings in inline JavaScript or CDATA sections aren't used instead. $parts = explode('</body>', $content); $post_body = array_pop($parts); $pre_body = implode('', $parts); $pre_body = implode('</body>', $parts); $this->sendPreBody($pre_body, $nojs_placeholders, $cumulative_assets); $this->sendPlaceholders($placeholders, $this->getPlaceholderOrder($pre_body, $placeholders), $cumulative_assets); Loading
core/modules/big_pipe/tests/src/FunctionalJavascript/BigPipeRegressionTest.php +5 −2 Original line number Diff line number Diff line Loading @@ -54,10 +54,10 @@ public function testMultipleClosingBodies_2678662(): void { $this->drupalGet(Url::fromRoute('big_pipe_regression_test.2678662')); // Confirm that AJAX behaviors were instantiated, if not, this points to a // JavaScript syntax error. // JavaScript syntax error and the JS variable has the appropriate content. $javascript = <<<JS (function(){ return Object.keys(Drupal.ajax.instances).length > 0; return Object.keys(Drupal.ajax.instances).length > 0 && hitsTheFloor === "</body>"; }()) JS; $this->assertJsCondition($javascript); Loading @@ -73,6 +73,9 @@ public function testMultipleClosingBodies_2678662(): void { // in an inline script. $this->assertSession() ->responseNotContains($js_code_until_closing_body_tag . "\n" . BigPipe::START_SIGNAL); // But the inline script itself should not be altered. $this->assertSession() ->responseContains(BigPipeRegressionTestController::MARKER_2678662); } /** Loading