diff --git a/core/modules/views/views.theme.inc b/core/modules/views/views.theme.inc index 2018d97..2d6e5f1 100644 --- a/core/modules/views/views.theme.inc +++ b/core/modules/views/views.theme.inc @@ -484,8 +484,7 @@ function template_preprocess_views_view_table(&$variables) { '#theme' => 'tablesort_indicator', '#style' => $initial, ); - $markup = drupal_render($tablesort_indicator); - $label = SafeMarkup::set($label . $markup); + $label = [['#markup' => $label], $tablesort_indicator]; } $query['order'] = $field; @@ -576,7 +575,12 @@ function template_preprocess_views_view_table(&$variables) { $field_output = $handler->getField($num, $field); $element_type = $fields[$field]->elementType(TRUE, TRUE); if ($element_type) { - $field_output = SafeMarkup::set('<' . $element_type . '>' . SafeMarkup::escape($field_output) . ''); + $tagged_output = array( + '#type' => 'html_tag', + '#tag' => $element_type, + '#value' => $field_output + ); + $field_output = drupal_render($tagged_output); } // Only bother with separators and stuff if the field shows up. @@ -584,17 +588,14 @@ function template_preprocess_views_view_table(&$variables) { // Place the field into the column, along with an optional separator. if (!empty($column_reference['content'])) { if (!empty($options['info'][$column]['separator'])) { - $safe_content = SafeMarkup::escape($column_reference['content']); $safe_separator = Xss::filterAdmin($options['info'][$column]['separator']); - $column_reference['content'] = SafeMarkup::set($safe_content . $safe_separator); + $column_reference['content'] = SafeMarkup::format('@content@separator', ['@content' => $column_reference['content'], '@separator' => $safe_separator]); } } else { $column_reference['content'] = ''; } - $safe_content = SafeMarkup::escape($column_reference['content']); - $safe_field_output = SafeMarkup::escape($field_output); - $column_reference['content'] = SafeMarkup::set($safe_content . $safe_field_output); + $column_reference['content'] = SafeMarkup::format('@content@field_output', ['@content' => $column_reference['content'], '@field_output' => $field_output]); } } $column_reference['attributes'] = new Attribute($column_reference['attributes']);