diff --git a/core/modules/big_pipe/src/Render/BigPipe.php b/core/modules/big_pipe/src/Render/BigPipe.php index 1894aa9..c299157 100644 --- a/core/modules/big_pipe/src/Render/BigPipe.php +++ b/core/modules/big_pipe/src/Render/BigPipe.php @@ -545,12 +545,12 @@ protected function renderPlaceholder($placeholder, array $placeholder_render_arr * only keep the first occurrence. */ protected function getPlaceholderOrder($html, $placeholders) { - $fragments = explode('
', $fragment, 2); + $t = explode('">', $fragment, 2); $placeholder_id = $t[0]; $placeholder_ids[] = $placeholder_id; } diff --git a/core/modules/big_pipe/src/Render/BigPipeInterface.php b/core/modules/big_pipe/src/Render/BigPipeInterface.php index 3e2156b..8e60ab9 100644 --- a/core/modules/big_pipe/src/Render/BigPipeInterface.php +++ b/core/modules/big_pipe/src/Render/BigPipeInterface.php @@ -52,7 +52,7 @@ * 1. BigPipe placeholders: 1 HtmlResponse + N embedded AjaxResponses. * - Before a BigPipe response is sent, it is just a HTML response that * contains BigPipe placeholders. Those placeholders look like - * . JavaScript is used to + * . JavaScript is used to * replace those placeholders. * Therefore these placeholders are actually sent to the client. * - The Skeleton of course has attachments, including most notably asset @@ -79,7 +79,7 @@ * - Before a BigPipe response is sent, it is just a HTML response that * contains no-JS BigPipe placeholders. Those placeholders can take two * different forms: - * 1. if it's a + * 1. if it's a * placeholder that will be replaced by HTML * 2. big_pipe_nojs_placeholder_attribute_safe:… if it's a placeholder * inside a HTML attribute, in which 1. would be invalid (angle brackets diff --git a/core/modules/big_pipe/src/Render/Placeholder/BigPipeStrategy.php b/core/modules/big_pipe/src/Render/Placeholder/BigPipeStrategy.php index 91ad604..c61c25c 100644 --- a/core/modules/big_pipe/src/Render/Placeholder/BigPipeStrategy.php +++ b/core/modules/big_pipe/src/Render/Placeholder/BigPipeStrategy.php @@ -183,7 +183,7 @@ protected static function createBigPipeJsPlaceholder($original_placeholder, arra $big_pipe_placeholder_id = static::generateBigPipePlaceholderId($original_placeholder, $placeholder_render_array); return [ - '#markup' => '', + '#markup' => '', '#cache' => [ 'max-age' => 0, 'contexts' => [ @@ -221,7 +221,7 @@ protected static function createBigPipeJsPlaceholder($original_placeholder, arra */ protected static function createBigPipeNoJsPlaceholder($original_placeholder, array $placeholder_render_array, $placeholder_must_be_attribute_safe = FALSE) { if (!$placeholder_must_be_attribute_safe) { - $big_pipe_placeholder = ''; + $big_pipe_placeholder = ''; } else { $big_pipe_placeholder = 'big_pipe_nojs_placeholder_attribute_safe:' . Html::escape($original_placeholder); diff --git a/core/modules/big_pipe/src/Tests/BigPipePlaceholderTestCases.php b/core/modules/big_pipe/src/Tests/BigPipePlaceholderTestCases.php index 102b718..1eb0366 100644 --- a/core/modules/big_pipe/src/Tests/BigPipePlaceholderTestCases.php +++ b/core/modules/big_pipe/src/Tests/BigPipePlaceholderTestCases.php @@ -61,7 +61,7 @@ public static function cases(ContainerInterface $container = NULL, AccountInterf ); $status_messages->bigPipePlaceholderId = 'callback=Drupal%5CCore%5CRender%5CElement%5CStatusMessages%3A%3ArenderMessages&args[0]&token=a8c34b5e'; $status_messages->bigPipePlaceholderRenderArray = [ - '#markup' => '', + '#markup' => '', '#cache' => $cacheability_depends_on_session_and_nojs_cookie, '#attached' => [ 'library' => ['big_pipe/big_pipe'], @@ -75,13 +75,13 @@ public static function cases(ContainerInterface $container = NULL, AccountInterf ], ], ]; - $status_messages->bigPipeNoJsPlaceholder = ''; + $status_messages->bigPipeNoJsPlaceholder = ''; $status_messages->bigPipeNoJsPlaceholderRenderArray = [ - '#markup' => '', + '#markup' => '', '#cache' => $cacheability_depends_on_session_and_nojs_cookie, '#attached' => [ 'big_pipe_nojs_placeholders' => [ - '' => $status_messages->placeholderRenderArray, + '' => $status_messages->placeholderRenderArray, ], ], ]; @@ -225,7 +225,7 @@ public static function cases(ContainerInterface $container = NULL, AccountInterf ); $current_time->bigPipePlaceholderId = 'timecurrent-timetime'; $current_time->bigPipePlaceholderRenderArray = [ - '#markup' => '', + '#markup' => '', '#cache' => $cacheability_depends_on_session_and_nojs_cookie, '#attached' => [ 'library' => ['big_pipe/big_pipe'], @@ -248,13 +248,13 @@ public static function cases(ContainerInterface $container = NULL, AccountInterf 'settings' => NULL, ], ]; - $current_time->bigPipeNoJsPlaceholder = ''; + $current_time->bigPipeNoJsPlaceholder = ''; $current_time->bigPipeNoJsPlaceholderRenderArray = [ - '#markup' => '', + '#markup' => '', '#cache' => $cacheability_depends_on_session_and_nojs_cookie, '#attached' => [ 'big_pipe_nojs_placeholders' => [ - '' => $current_time->placeholderRenderArray, + '' => $current_time->placeholderRenderArray, ], ], ]; @@ -274,7 +274,7 @@ public static function cases(ContainerInterface $container = NULL, AccountInterf ); $exception->bigPipePlaceholderId = 'callback=%5CDrupal%5Cbig_pipe_test%5CBigPipeTestController%3A%3Aexception&args[0]=llamas&args[1]=suck&token=68a75f1a'; $exception->bigPipePlaceholderRenderArray = [ - '#markup' => '', + '#markup' => '', '#cache' => $cacheability_depends_on_session_and_nojs_cookie, '#attached' => [ 'library' => ['big_pipe/big_pipe'], @@ -289,7 +289,7 @@ public static function cases(ContainerInterface $container = NULL, AccountInterf ], ]; $exception->embeddedAjaxResponseCommands = NULL; - $exception->bigPipeNoJsPlaceholder = ''; + $exception->bigPipeNoJsPlaceholder = ''; $exception->bigPipeNoJsPlaceholderRenderArray = [ '#markup' => $exception->bigPipeNoJsPlaceholder, '#cache' => $cacheability_depends_on_session_and_nojs_cookie, @@ -314,7 +314,7 @@ public static function cases(ContainerInterface $container = NULL, AccountInterf ); $embedded_response_exception->bigPipePlaceholderId = 'callback=%5CDrupal%5Cbig_pipe_test%5CBigPipeTestController%3A%3AresponseException&&token=2a9bd022'; $embedded_response_exception->bigPipePlaceholderRenderArray = [ - '#markup' => '', + '#markup' => '', '#cache' => $cacheability_depends_on_session_and_nojs_cookie, '#attached' => [ 'library' => ['big_pipe/big_pipe'], @@ -329,7 +329,7 @@ public static function cases(ContainerInterface $container = NULL, AccountInterf ], ]; $embedded_response_exception->embeddedAjaxResponseCommands = NULL; - $embedded_response_exception->bigPipeNoJsPlaceholder = ''; + $embedded_response_exception->bigPipeNoJsPlaceholder = ''; $embedded_response_exception->bigPipeNoJsPlaceholderRenderArray = [ '#markup' => $embedded_response_exception->bigPipeNoJsPlaceholder, '#cache' => $cacheability_depends_on_session_and_nojs_cookie, diff --git a/core/modules/big_pipe/src/Tests/BigPipeTest.php b/core/modules/big_pipe/src/Tests/BigPipeTest.php index a3f773e..59fad2d 100644 --- a/core/modules/big_pipe/src/Tests/BigPipeTest.php +++ b/core/modules/big_pipe/src/Tests/BigPipeTest.php @@ -353,7 +353,7 @@ protected function assertBigPipePlaceholders(array $expected_big_pipe_placeholde foreach ($expected_big_pipe_placeholders as $big_pipe_placeholder_id => $expected_ajax_response) { $this->pass('BigPipe placeholder: ' . $big_pipe_placeholder_id, 'Debug'); // Verify expected placeholder. - $expected_placeholder_html = ''; + $expected_placeholder_html = ''; $this->assertRaw($expected_placeholder_html, 'BigPipe placeholder for placeholder ID "' . $big_pipe_placeholder_id . '" found.'); $pos = strpos($this->getRawContent(), $expected_placeholder_html); $placeholder_positions[$pos] = $big_pipe_placeholder_id;