diff --git a/core/modules/ckeditor/lib/Drupal/ckeditor/Plugin/CKEditorPlugin/Internal.php b/core/modules/ckeditor/lib/Drupal/ckeditor/Plugin/CKEditorPlugin/Internal.php
index c5332e1c84e18090b8bf0183e820e4cf1c051fb4..0054d5e8a8bdf93b22ae27eae8f832d737983abd 100644
--- a/core/modules/ckeditor/lib/Drupal/ckeditor/Plugin/CKEditorPlugin/Internal.php
+++ b/core/modules/ckeditor/lib/Drupal/ckeditor/Plugin/CKEditorPlugin/Internal.php
@@ -258,7 +258,7 @@ protected function generateFormatTagsSetting(Editor $editor) {
     $possible_format_tags = array('h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'pre');
     foreach ($possible_format_tags as $tag) {
       $input = '<' . $tag . '>TEST</' . $tag . '>';
-      $output = trim(check_markup($input, $editor->format));
+      $output = trim(check_markup($input, $editor->format, '', TRUE));
       if ($input == $output) {
         $format_tags[] = $tag;
       }