diff --git a/core/modules/ckeditor/ckeditor.admin.inc b/core/modules/ckeditor/ckeditor.admin.inc index 4ee12bb..3a9a9c3 100644 --- a/core/modules/ckeditor/ckeditor.admin.inc +++ b/core/modules/ckeditor/ckeditor.admin.inc @@ -66,10 +66,10 @@ function template_preprocess_ckeditor_settings_toolbar(&$variables) { $build_button_item = function($button, $rtl) { // Value of the button item. if (isset($button['image_alternative' . $rtl])) { - $value = SafeMarkup::set($button['image_alternative' . $rtl]); + $value = $button['image_alternative' . $rtl]; } elseif (isset($button['image_alternative'])) { - $value = SafeMarkup::set($button['image_alternative']); + $value = $button['image_alternative']; } elseif (isset($button['image'])) { $value = array( diff --git a/core/modules/ckeditor/src/Plugin/CKEditorPlugin/Internal.php b/core/modules/ckeditor/src/Plugin/CKEditorPlugin/Internal.php index c405c7f..c57af49 100644 --- a/core/modules/ckeditor/src/Plugin/CKEditorPlugin/Internal.php +++ b/core/modules/ckeditor/src/Plugin/CKEditorPlugin/Internal.php @@ -9,6 +9,7 @@ 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; @@ -127,7 +128,8 @@ public function getConfig(Editor $editor) { */ public function getButtons() { $button = function($name, $direction = 'ltr') { - return '' . $name . ''; + $clean_name = str_replace(' ', '', $name); + return SafeMarkup::format('@name', ['@direction' => $direction, '@name' => $name, '@cleanname' => $clean_name]); }; return array(