diff -u b/core/modules/ckeditor/src/Plugin/CKEditorPlugin/Internal.php b/core/modules/ckeditor/src/Plugin/CKEditorPlugin/Internal.php
--- b/core/modules/ckeditor/src/Plugin/CKEditorPlugin/Internal.php
+++ b/core/modules/ckeditor/src/Plugin/CKEditorPlugin/Internal.php
@@ -9,7 +9,6 @@
use Drupal\ckeditor\CKEditorPluginBase;
use Drupal\Component\Utility\NestedArray;
-use Drupal\Component\Utility\SafeMarkup;
use Drupal\Core\Cache\Cache;
use Drupal\Core\Cache\CacheBackendInterface;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
@@ -131,7 +130,15 @@
// In the markup below, we mostly use the name (which may include spaces),
// but in one spot we use it as a CSS class, so strip spaces.
$class_name = str_replace(' ', '', $name);
- return SafeMarkup::format('@name', ['@direction' => $direction, '@name' => $name, '@classname' => $class_name]);
+ return [
+ '#type' => 'inline_template',
+ '#template' => '{{ name }}',
+ '#context' => [
+ 'direction' => $direction,
+ 'name' => $name,
+ 'classname' => $class_name,
+ ],
+ ];
};
return array(
@@ -260,7 +267,13 @@
),
'Format' => array(
'label' => t('HTML block format'),
- 'image_alternative' => SafeMarkup::format('@format_text', ['@format_text' => t('Format')]),
+ 'image_alternative' => [
+ '#type' => 'inline_template',
+ '#template' => '{{ format_text }}',
+ '#context' => [
+ 'format_text' => t('Format'),
+ ],
+ ],
),
// "table" plugin.
'Table' => array(
@@ -286,7 +299,13 @@
// No plugin, separator "button" for toolbar builder UI use only.
'-' => array(
'label' => t('Separator'),
- 'image_alternative' => SafeMarkup::format('', ['@button_separator_text' => t('Button separator')]),
+ 'image_alternative' => [
+ '#type' => 'inline_template',
+ '#template' => '',
+ '#context' => [
+ 'button_separator_text' => t('Button separator'),
+ ],
+ ],
'attributes' => array(
'class' => array('ckeditor-button-separator'),
'data-drupal-ckeditor-type' => 'separator',
diff -u b/core/modules/ckeditor/src/Plugin/CKEditorPlugin/StylesCombo.php b/core/modules/ckeditor/src/Plugin/CKEditorPlugin/StylesCombo.php
--- b/core/modules/ckeditor/src/Plugin/CKEditorPlugin/StylesCombo.php
+++ b/core/modules/ckeditor/src/Plugin/CKEditorPlugin/StylesCombo.php
@@ -10,7 +10,6 @@
use Drupal\ckeditor\CKEditorPluginBase;
use Drupal\ckeditor\CKEditorPluginConfigurableInterface;
use Drupal\Component\Utility\NestedArray;
-use Drupal\Component\Utility\SafeMarkup;
use Drupal\Core\Form\FormStateInterface;
use Drupal\editor\Entity\Editor;
@@ -60,7 +59,13 @@
return array(
'Styles' => array(
'label' => t('Font style'),
- 'image_alternative' => SafeMarkup::format('@styles_text', ['@styles_text' => t('Styles')]),
+ 'image_alternative' => [
+ '#type' => 'inline_template',
+ '#template' => '{{ styles_text }}',
+ '#context' => [
+ 'styles_text' => t('Styles'),
+ ],
+ ],
),
);
}
interdiff impossible; taking evasive action
reverted:
--- b/core/modules/ckeditor/src/Tests/CKEditorAdminTest.php
+++ a/core/modules/ckeditor/src/Tests/CKEditorAdminTest.php
@@ -164,19 +164,6 @@
$this->assertTrue($editor instanceof Editor, 'An Editor config entity exists.');
$this->assertIdentical($expected_settings, $editor->getSettings(), 'The Editor config entity has the correct settings.');
- // Check that the markup we're setting for the toolbar buttons (actually in
- // JavaScript's drupalSettings, and Unicode-escaped) is correctly rendered.
- $this->drupalGet('admin/config/content/formats/manage/filtered_html');
- $this->verbose($this->content);
- // Check the Button separator.
- $this->assertRaw('\u003Cli data-drupal-ckeditor-button-name=\u0022-\u0022 class=\u0022ckeditor-button-separator ckeditor-multiple-button\u0022 data-drupal-ckeditor-type=\u0022separator\u0022\u003E\u003Ca href=\u0022#\u0022 role=\u0022button\u0022 aria-label=\u0022Button separator\u0022 class=\u0022ckeditor-separator\u0022\u003E\u003C\/a\u003E\u003C\/li\u003E');
- // Check the Format dropdown.
- $this->assertRaw('\u003Cli data-drupal-ckeditor-button-name=\u0022Format\u0022 class=\u0022ckeditor-button\u0022\u003E\u003Ca href=\u0022#\u0022 role=\u0022button\u0022 aria-label=\u0022Format\u0022\u003E\u003Cspan class=\u0022ckeditor-button-dropdown\u0022\u003EFormat\u003Cspan class=\u0022ckeditor-button-arrow\u0022\u003E\u003C\/span\u003E\u003C\/span\u003E\u003C\/a\u003E\u003C\/li\u003E');
- // Check the Styles dropdown.
- $this->assertRaw('\u003Cli data-drupal-ckeditor-button-name=\u0022Styles\u0022 class=\u0022ckeditor-button\u0022\u003E\u003Ca href=\u0022#\u0022 role=\u0022button\u0022 aria-label=\u0022Styles\u0022\u003E\u003Cspan class=\u0022ckeditor-button-dropdown\u0022\u003EStyles\u003Cspan class=\u0022ckeditor-button-arrow\u0022\u003E\u003C\/span\u003E\u003C\/span\u003E\u003C\/a\u003E\u003C\/li\u003E');
- // Check strikethrough.
- $this->assertRaw('\u003Cli data-drupal-ckeditor-button-name=\u0022Strike\u0022 class=\u0022ckeditor-button\u0022\u003E\u003Ca href=\u0022#\u0022 class=\u0022cke-icon-only cke_ltr\u0022 role=\u0022button\u0022 title=\u0022strike\u0022 aria-label=\u0022strike\u0022\u003E\u003Cspan class=\u0022cke_button_icon cke_button__strike_icon\u0022\u003Estrike\u003C\/span\u003E\u003C\/a\u003E\u003C\/li\u003E');
-
// Now enable the ckeditor_test module, which provides one configurable
// CKEditor plugin — this should not affect the Editor config entity.
\Drupal::service('module_installer')->install(array('ckeditor_test'));
unchanged:
--- a/core/modules/ckeditor/src/Tests/CKEditorAdminTest.php
+++ b/core/modules/ckeditor/src/Tests/CKEditorAdminTest.php
@@ -176,6 +176,19 @@ function testExistingFormat() {
$this->assertTrue($editor instanceof Editor, 'An Editor config entity exists.');
$this->assertIdentical($expected_settings, $editor->getSettings(), 'The Editor config entity has the correct settings.');
+ // Check that the markup we're setting for the toolbar buttons (actually in
+ // JavaScript's drupalSettings, and Unicode-escaped) is correctly rendered.
+ $this->drupalGet('admin/config/content/formats/manage/filtered_html');
+ $this->verbose($this->content);
+ // Check the Button separator.
+ $this->assertRaw('\u003Cli data-drupal-ckeditor-button-name=\u0022-\u0022 class=\u0022ckeditor-button-separator ckeditor-multiple-button\u0022 data-drupal-ckeditor-type=\u0022separator\u0022\u003E\u003Ca href=\u0022#\u0022 role=\u0022button\u0022 aria-label=\u0022Button separator\u0022 class=\u0022ckeditor-separator\u0022\u003E\u003C\/a\u003E\u003C\/li\u003E');
+ // Check the Format dropdown.
+ $this->assertRaw('\u003Cli data-drupal-ckeditor-button-name=\u0022Format\u0022 class=\u0022ckeditor-button\u0022\u003E\u003Ca href=\u0022#\u0022 role=\u0022button\u0022 aria-label=\u0022Format\u0022\u003E\u003Cspan class=\u0022ckeditor-button-dropdown\u0022\u003EFormat\u003Cspan class=\u0022ckeditor-button-arrow\u0022\u003E\u003C\/span\u003E\u003C\/span\u003E\u003C\/a\u003E\u003C\/li\u003E');
+ // Check the Styles dropdown.
+ $this->assertRaw('\u003Cli data-drupal-ckeditor-button-name=\u0022Styles\u0022 class=\u0022ckeditor-button\u0022\u003E\u003Ca href=\u0022#\u0022 role=\u0022button\u0022 aria-label=\u0022Styles\u0022\u003E\u003Cspan class=\u0022ckeditor-button-dropdown\u0022\u003EStyles\u003Cspan class=\u0022ckeditor-button-arrow\u0022\u003E\u003C\/span\u003E\u003C\/span\u003E\u003C\/a\u003E\u003C\/li\u003E');
+ // Check strikethrough.
+ $this->assertRaw('\u003Cli data-drupal-ckeditor-button-name=\u0022Strike\u0022 class=\u0022ckeditor-button\u0022\u003E\u003Ca href=\u0022#\u0022 class=\u0022cke-icon-only cke_ltr\u0022 role=\u0022button\u0022 title=\u0022strike\u0022 aria-label=\u0022strike\u0022\u003E\u003Cspan class=\u0022cke_button_icon cke_button__strike_icon\u0022\u003Estrike\u003C\/span\u003E\u003C\/a\u003E\u003C\/li\u003E');
+
// Now enable the ckeditor_test module, which provides one configurable
// CKEditor plugin — this should not affect the Editor config entity.
\Drupal::service('module_installer')->install(array('ckeditor_test'));