diff --git a/core/modules/system/system.install b/core/modules/system/system.install index a675333..96fc5e0 100644 --- a/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -351,32 +351,35 @@ function system_requirements($phase) { // Set summary and description based on values determined above. $summary = t('Last run !time ago', array('!time' => \Drupal::service('date.formatter')->formatInterval(REQUEST_TIME - $cron_last))); - $description = ''; + $description_cron = array(); + $description_cron['run_warning'] = ''; if ($severity != REQUIREMENT_INFO) { - $description = t('Cron has not run recently.') . ' ' . $help . ' '; + $description_cron['run_warning'] = t('Cron has not run recently.') . ' ' . $help; } - $description .= t('You can run cron manually.', array('@cron' => \Drupal::url('system.run_cron'))) . ' '; + $description_cron['run_manual'] = t('You can run cron manually.', array('@cron' => \Drupal::url('system.run_cron'))); // Get cron key. $cron_key = \Drupal::state()->get('system.cron_key'); // Get cron run outside url. $cron_outside_url = \Drupal::url('system.cron', array('key' => $cron_key), array('absolute' => TRUE)); - $description .= '
' . t('To run cron from outside the site, go to !cron', array('!cron' => $cron_outside_url)); + $description_cron['run_outside'] = t('To run cron from outside the site, go to !cron', array('!cron' => $cron_outside_url)); - // The $description string is concatenated from t() calls, so safe. - // We can implement raw filter in the inline_template call. $description = array( '#type' => 'inline_template', - '#template' => '{{ description|raw }}', - '#context' => array('description' => $description), + '#template' => '{{ run_warning }} {{ run_manual }}
{{ run_outside }}', + '#context' => array( + 'run_warning' => $description_cron['run_warning'], + 'run_manual' => $description_cron['run_manual'], + 'run_outside' => $description_cron['run_outside'], + ), ); $requirements['cron'] = array( 'title' => t('Cron maintenance tasks'), 'severity' => $severity, 'value' => $summary, - 'description' => \Drupal::service('renderer')->render($description), + 'description' => $description, ); } if ($phase != 'install') {