only in patch2:
unchanged:
--- a/core/includes/menu.inc
+++ b/core/includes/menu.inc
@@ -331,7 +331,7 @@ function template_preprocess_menu_local_task(&$variables) {
if (!empty($variables['element']['#active'])) {
// Add text to indicate active tab for non-visual users.
- $active = '' . t('(active tab)') . '';
+ $active = String::format('@label', array('@label' => t('(active tab)')));
$variables['attributes']['class'] = array('active');
// If the link does not contain HTML already, String::checkPlain() it now.
only in patch2:
unchanged:
--- a/core/modules/block/src/BlockListBuilder.php
+++ b/core/modules/block/src/BlockListBuilder.php
@@ -8,6 +8,7 @@
namespace Drupal\block;
use Drupal\Component\Utility\Html;
+use Drupal\Component\Utility\SafeMarkup;
use Drupal\Core\Block\BlockManagerInterface;
use Drupal\Component\Serialization\Json;
use Drupal\Component\Utility\String;
@@ -355,7 +356,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
);
}
$form['place_blocks']['list'][$category_key]['content']['#links'][$plugin_id] = array(
- 'title' => $plugin_definition['admin_label'],
+ 'title' => SafeMarkup::escape($plugin_definition['admin_label']),
'url' => Url::fromRoute('block.admin_add', [
'plugin_id' => $plugin_id,
'theme' => $this->theme
@@ -367,6 +368,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
'width' => 700,
)),
),
+ 'html' => TRUE,
);
}
return $form;
only in patch2:
unchanged:
--- a/core/modules/views/src/Plugin/Derivative/ViewsBlock.php
+++ b/core/modules/views/src/Plugin/Derivative/ViewsBlock.php
@@ -9,6 +9,7 @@
use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Plugin\Discovery\ContainerDeriverInterface;
+use Drupal\Core\StringTranslation\TranslationWrapper;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
@@ -93,10 +94,10 @@ public function getDerivativeDefinitions($base_plugin_definition) {
if (empty($desc)) {
if ($display->display['display_title'] == $display->definition['title']) {
- $desc = t('!view', array('!view' => $view->label()));
+ $desc = new TranslationWrapper('!view', array('!view' => $view->label()));
}
else {
- $desc = t('!view: !display', array('!view' => $view->label(), '!display' => $display->display['display_title']));
+ $desc = new TranslationWrapper('!view: !display', array('!view' => $view->label(), '!display' => $display->display['display_title']));
}
}
$this->derivatives[$delta] = array(