diff --git a/core/modules/views_ui/src/ViewUI.php b/core/modules/views_ui/src/ViewUI.php index a844ca9..6abfecb 100644 --- a/core/modules/views_ui/src/ViewUI.php +++ b/core/modules/views_ui/src/ViewUI.php @@ -680,13 +680,17 @@ public function renderPreview($display_id, $args = array()) { ), ); if (!empty($this->additionalQueries)) { - $queries = '' . t('These queries were run during view rendering:') . ''; + $queries[] = array( + '#prefix' => '', + '#markup' => t('These queries were run during view rendering:'), + '#suffix' => '', + ); foreach ($this->additionalQueries as $query) { - if ($queries) { - $queries .= "\n"; - } $query_string = strtr($query['query'], $query['args']); - $queries .= t('[@time ms] @query', array('@time' => round($query['time'] * 100000, 1) / 100000.0, '@query' => $query_string)); + $queries[] = array( + '#prefix' => "\n", + '#markup' => t('[@time ms] @query', array('@time' => round($query['time'] * 100000, 1) / 100000.0, '@query' => $query_string)), + ); } $rows['query'][] = array( @@ -696,7 +700,13 @@ public function renderPreview($display_id, $args = array()) { '#template' => "{% trans 'Other queries' %}", ), ), - SafeMarkup::set('
' . $queries . '
'), + array( + 'data' => array( + '#prefix' => '
',
+                     'queries' => $queries,
+                     '#suffix' => '
', + ), + ), ); } } @@ -718,9 +728,21 @@ public function renderPreview($display_id, $args = array()) { else { $path = t('This display has no path.'); } - $rows['query'][] = array(SafeMarkup::set('' . t('Path') . ''), $path); + $rows['query'][] = array( + array( + 'data' => array( + '#prefix' => '', + '#markup' => t('Path'), + '#suffix' => '', + ), + ), + array( + 'data' => array( + '#markup' => $path, + ), + ) + ); } - if ($show_stats) { $rows['statistics'][] = array( array( @@ -758,10 +780,36 @@ public function renderPreview($display_id, $args = array()) { // No query was run. Display that information in place of either the // query or the performance statistics, whichever comes first. if ($combined || ($show_location === 'above')) { - $rows['query'] = array(array(SafeMarkup::set('' . t('Query') . ''), t('No query was run'))); + $rows['query'][] = array( + array( + 'data' => array( + '#prefix' => '', + '#markup' => t('Query'), + '#suffix' => '', + ), + ), + array( + 'data' => array( + '#markup' => t('No query was run'), + ), + ), + ); } else { - $rows['statistics'] = array(array(SafeMarkup::set('' . t('Query') . ''), t('No query was run'))); + $rows['statistics'][] = array( + array( + 'data' => array( + '#prefix' => '', + '#markup' => t('Query'), + '#suffix' => '', + ), + ), + array( + 'data' => array( + '#markup' => t('No query was run'), + ), + ), + ); } } }