diff --git a/core/includes/install.inc b/core/includes/install.inc index 01d6166..45fc303 100644 --- a/core/includes/install.inc +++ b/core/includes/install.inc @@ -982,12 +982,10 @@ function drupal_check_module($module) { if (isset($requirement['severity']) && $requirement['severity'] == REQUIREMENT_ERROR) { $message = SafeMarkup::escape($requirement['description']); if (isset($requirement['value']) && $requirement['value']) { - $message .= ' (' . t('Currently using !item !version', array('!item' => $requirement['title'], '!version' => $requirement['value'])) . ')'; + $currently_using = t('Currently using @item @version', array('@item' => $requirement['title'], '@version' => $requirement['value'])); + $message = SafeMarkup::format('@message (@currently_using)', ['@message' => $message, '@currently_using' => $currently_using]); } - // The string was previously checked as safe or escaped properly with - // SafeMarkup::escape() method and the concatinated message string is - // designated safe by running through the t() function. - drupal_set_message(SafeMarkup::set($message), 'error'); + drupal_set_message($message, 'error'); } } return FALSE; 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'), + ), + ), + ); } } }