diff --git a/core/modules/views_ui/views_ui.theme.inc b/core/modules/views_ui/views_ui.theme.inc index 2289315..4aafde4 100644 --- a/core/modules/views_ui/views_ui.theme.inc +++ b/core/modules/views_ui/views_ui.theme.inc @@ -149,25 +149,25 @@ function theme_views_ui_build_group_filter_form($variables) { $form['group_items'][$group_id]['value']['#title'] = ''; $default = array( $form['default_group'][$group_id], - $form['default_group_multiple'][$group_id] + $form['default_group_multiple'][$group_id], ); - $link = array( + $link = [ '#type' => 'link', - '#url' => Url::fromRoute('', [], array( - 'attributes' => array( + '#url' => Url::fromRoute('', [], [ + 'attributes' => [ 'id' => 'views-remove-link-' . $group_id, - 'class' => array( + 'class' => [ 'views-hidden', 'views-button-remove', 'views-groups-remove-link', 'views-remove-link', - ), + ], 'alt' => t('Remove this item'), 'title' => t('Remove this item'), - ), - )), - '#title' => SafeMarkup::format('@text', array('@text' => t('Remove'))), - ); + ], + ]), + '#title' => SafeMarkup::format('@text', ['@text' => t('Remove')]), + ]; $remove = [$form['group_items'][$group_id]['remove'], $link]; $data = array( 'default' => ['data' => $default], diff --git a/core/tests/Drupal/Tests/Component/Utility/SafeMarkupTest.php b/core/tests/Drupal/Tests/Component/Utility/SafeMarkupTest.php index 9cc485c..acba34a 100644 --- a/core/tests/Drupal/Tests/Component/Utility/SafeMarkupTest.php +++ b/core/tests/Drupal/Tests/Component/Utility/SafeMarkupTest.php @@ -226,7 +226,8 @@ public function providerReplace() { TRUE, ]; - // Replacement unsafe safe. + // Safe subject, but should result in unsafe string because replacement is + // unsafe. $tests[] = [ '', 'fubar',