diff --git a/core/modules/comment/src/CommentTypeListBuilder.php b/core/modules/comment/src/CommentTypeListBuilder.php index 248a5d5..f813665 100644 --- a/core/modules/comment/src/CommentTypeListBuilder.php +++ b/core/modules/comment/src/CommentTypeListBuilder.php @@ -47,7 +47,7 @@ public function buildHeader() { public function buildRow(EntityInterface $entity) { $row['type'] = SafeMarkup::checkPlain($entity->label()); // #markup is filtered for admin XSS automatically. - $row['description']['data']['#markup'] = $entity->getDescription(); + $row['description']['data'] = ['#markup' => $entity->getDescription()]; return $row + parent::buildRow($entity); } diff --git a/core/modules/menu_ui/src/MenuListBuilder.php b/core/modules/menu_ui/src/MenuListBuilder.php index 86a7a12..9b5a171 100644 --- a/core/modules/menu_ui/src/MenuListBuilder.php +++ b/core/modules/menu_ui/src/MenuListBuilder.php @@ -40,7 +40,7 @@ public function buildRow(EntityInterface $entity) { 'class' => array('menu-label'), ); // #markup is filtered for admin XSS automatically. - $row['description']['data']['#markup'] = $entity->getDescription(); + $row['description']['data'] = ['#markup' => $entity->getDescription()]; return $row + parent::buildRow($entity); } diff --git a/core/modules/node/node.module b/core/modules/node/node.module index 1d3c46e..940142e 100644 --- a/core/modules/node/node.module +++ b/core/modules/node/node.module @@ -510,7 +510,7 @@ function template_preprocess_node_add_list(&$variables) { 'type' => $type->id(), 'add_link' => \Drupal::l($type->label(), new Url('node.add', array('node_type' => $type->id()))), 'description' => array( - // The description will XSS filtered by the render system. + // #markup is filtered for admin XSS automatically. '#markup' => $type->getDescription(), ), ); diff --git a/core/modules/node/src/NodeTypeListBuilder.php b/core/modules/node/src/NodeTypeListBuilder.php index 4e162a2..9f764cd 100644 --- a/core/modules/node/src/NodeTypeListBuilder.php +++ b/core/modules/node/src/NodeTypeListBuilder.php @@ -40,7 +40,7 @@ public function buildRow(EntityInterface $entity) { 'class' => array('menu-label'), ); // #markup is filtered for admin XSS automatically. - $row['description']['data']['#markup'] = $entity->getDescription(); + $row['description']['data'] = ['#markup' => $entity->getDescription()]; return $row + parent::buildRow($entity); } diff --git a/core/modules/system/src/Plugin/Block/SystemBrandingBlock.php b/core/modules/system/src/Plugin/Block/SystemBrandingBlock.php index 16b0368..88aa877 100644 --- a/core/modules/system/src/Plugin/Block/SystemBrandingBlock.php +++ b/core/modules/system/src/Plugin/Block/SystemBrandingBlock.php @@ -174,6 +174,7 @@ public function build() { ); $build['site_slogan'] = array( + // #markup is filtered for admin XSS automatically. '#markup' => $site_config->get('slogan'), '#access' => $this->configuration['use_site_slogan'], ); diff --git a/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc index 1141a35..a7cabee 100644 --- a/core/modules/system/system.admin.inc +++ b/core/modules/system/system.admin.inc @@ -58,6 +58,7 @@ function template_preprocess_admin_block_content(&$variables) { foreach ($variables['content'] as $key => $item) { $variables['content'][$key]['link'] = \Drupal::l($item['title'], $item['url']); if (!$variables['compact'] && isset($item['description'])) { + // #markup is filtered for admin XSS automatically. $variables['content'][$key]['description'] = ['#markup' => $item['description']]; } else { diff --git a/core/modules/views_ui/views_ui.module b/core/modules/views_ui/views_ui.module index 48d70f6..5b43ad1 100644 --- a/core/modules/views_ui/views_ui.module +++ b/core/modules/views_ui/views_ui.module @@ -129,8 +129,9 @@ function views_ui_preprocess_views_view(&$variables) { // Render title for the admin preview. if (!empty($view->live_preview)) { - // #markup is filtered for admin XSS automatically. - $variables['title']['#markup'] = $view->getTitle(); + // The title will be autoescaped by Twig so it is not necessary to XSS + // filter it. + $variables['title'] = $view->getTitle(); } if (!empty($view->live_preview) && \Drupal::moduleHandler()->moduleExists('contextual')) {