diff --git a/core/modules/system/src/Tests/Theme/EntityFilteringThemeTest.php b/core/modules/system/src/Tests/Theme/EntityFilteringThemeTest.php
index ba366a3..3a186fe 100644
--- a/core/modules/system/src/Tests/Theme/EntityFilteringThemeTest.php
+++ b/core/modules/system/src/Tests/Theme/EntityFilteringThemeTest.php
@@ -142,6 +142,8 @@ function testThemedEntity() {
         $this->drupalGet($path);
         $this->assertResponse(200);
         $this->assertNoRaw($this->xssLabel);
+        // Ensure there is no double escaping.
+        $this->assertNoEscaped('&lt;');
       }
     }
   }
diff --git a/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_attachment_ui.yml b/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_attachment_ui.yml
index 529ea0a..300a6fa 100644
--- a/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_attachment_ui.yml
+++ b/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_attachment_ui.yml
@@ -1,23 +1,19 @@
 langcode: en
 status: true
-dependencies:
-  module:
-    - user
+dependencies: {  }
 id: test_attachment_ui
 label: null
 module: views
 description: ''
 tag: ''
 base_table: views_test_data
-base_field: nid
+base_field: ''
 core: '8'
 display:
   default:
     display_options:
       access:
-        type: perm
-        options:
-          perm: 'views_test_data test permission'
+        type: none
       cache:
         type: tag
       exposed_form:
@@ -34,15 +30,47 @@ display:
           table: views_test_data
           field: id
           plugin_id: numeric
+      display_extenders: {  }
     display_plugin: default
     display_title: Master
     id: default
     position: 0
+    cache_metadata:
+      max-age: -1
+      contexts:
+        - 'languages:language_interface'
+        - url.query_args
+      tags: {  }
   attachment_1:
     display_plugin: attachment
     display_title: Attachment
     id: attachment_1
     position: 1
+    display_options:
+      title: '<em>Markup</em>'
+      display_extenders: {  }
+      defaults:
+        title: false
+        header: false
+      header:
+        area:
+          id: area
+          table: views
+          field: area
+          relationship: none
+          group_type: group
+          admin_label: ''
+          empty: true
+          tokenize: false
+          content:
+            value: 'Attachment title: [view:title]'
+            format: plain_text
+          plugin_id: text
+    cache_metadata:
+      max-age: -1
+      contexts:
+        - 'languages:language_interface'
+      tags: {  }
   feed_1:
     display_plugin: feed
     id: feed_1
@@ -65,10 +93,23 @@ display:
             guid_field: id
             guid_field_is_permalink: false
       path: test_attachment_ui_feed
+      display_extenders: {  }
+    cache_metadata:
+      max-age: -1
+      contexts:
+        - 'languages:language_interface'
+      tags: {  }
   page_1:
     display_plugin: page
-    display_title: <em>Page</em>
+    display_title: '<em>Page</em>'
     display_options:
       path: test_attachment_ui
+      display_extenders: {  }
     id: page_1
     position: 2
+    cache_metadata:
+      max-age: -1
+      contexts:
+        - 'languages:language_interface'
+        - url.query_args
+      tags: {  }
diff --git a/core/modules/views_ui/src/Tests/DisplayAttachmentTest.php b/core/modules/views_ui/src/Tests/DisplayAttachmentTest.php
index 455ae9f..693bb48 100644
--- a/core/modules/views_ui/src/Tests/DisplayAttachmentTest.php
+++ b/core/modules/views_ui/src/Tests/DisplayAttachmentTest.php
@@ -61,5 +61,10 @@ public function testAttachmentUI() {
     $view = Views::getView('test_attachment_ui');
     $view->initDisplay();
     $this->assertEqual(array_keys($view->displayHandlers->get('attachment_1')->getOption('displays')), array('default', 'page_1'), 'The attached displays got saved as expected');
+
+    // The attachment title should be escaped as it is using the plain text
+    // formatter.
+    $this->drupalGet('test_attachment_ui');
+    $this->assertEscaped('<em>Markup</em>');
   }
 }
