diff --git a/core/modules/system/src/Tests/Ajax/DialogTest.php b/core/modules/system/src/Tests/Ajax/DialogTest.php
index 37bf06c..6654ba2 100644
--- a/core/modules/system/src/Tests/Ajax/DialogTest.php
+++ b/core/modules/system/src/Tests/Ajax/DialogTest.php
@@ -174,6 +174,7 @@ public function testDialog() {
     ];
     $this->assertEqual($expected_ajax_settings, $ajax_result[0]['settings']['ajax']);
     $this->setRawContent($ajax_result[3]['data']);
+
     // Remove the data, the form build id and token will never match.
     unset($ajax_result[3]['data']);
     $form = $this->xpath("//form[@id='ajax-test-form']");
diff --git a/core/modules/views/src/Tests/Plugin/DisplayFeedTest.php b/core/modules/views/src/Tests/Plugin/DisplayFeedTest.php
index cef9bab..8411ce2 100644
--- a/core/modules/views/src/Tests/Plugin/DisplayFeedTest.php
+++ b/core/modules/views/src/Tests/Plugin/DisplayFeedTest.php
@@ -43,7 +43,12 @@ protected function setUp() {
    */
   public function testFeedOutput() {
     $this->drupalCreateContentType(['type' => 'page']);
-    $this->drupalCreateNode();
+
+    // Verify a title with HTML entities is properly escaped.
+    $node_title = 'This "cool" & "neat" article\'s title';
+    $this->drupalCreateNode(array(
+      'title' => $node_title
+    ));
 
     // Test the site name setting.
     $site_name = $this->randomMachineName();
@@ -52,6 +57,7 @@ public function testFeedOutput() {
     $this->drupalGet('test-feed-display.xml');
     $result = $this->xpath('//title');
     $this->assertEqual($result[0], $site_name, 'The site title is used for the feed title.');
+    $this->assertEqual($result[1], $node_title, 'Node title with HTML entities displays correctly.');
 
     $view = $this->container->get('entity.manager')->getStorage('view')->load('test_display_feed');
     $display = &$view->getDisplay('feed_1');
@@ -74,4 +80,21 @@ public function testFeedOutput() {
     $this->assertTrue(strpos($feed_icon[0]['href'], 'test-feed-display.xml'), 'The feed icon was found.');
   }
 
+  /**
+   * Tests the rendered output for fields display.
+   */
+  public function testFeedFieldOutput() {
+    $this->drupalCreateContentType(['type' => 'page']);
+
+    // Verify a title with HTML entities is properly escaped.
+    $node_title = 'This "cool" & "neat" article\'s title';
+    $this->drupalCreateNode(array(
+      'title' => $node_title
+    ));
+
+    $this->drupalGet('test-feed-display-fields.xml');
+    $result = $this->xpath('//title/a');
+    $this->assertEqual($result[0], $node_title, 'Node title with HTML entities displays correctly.');
+  }
+
 }
diff --git a/core/modules/views/templates/views-view-row-rss.html.twig b/core/modules/views/templates/views-view-row-rss.html.twig
index e07244c..6b58a5b 100644
--- a/core/modules/views/templates/views-view-row-rss.html.twig
+++ b/core/modules/views/templates/views-view-row-rss.html.twig
@@ -14,9 +14,16 @@
  * @ingroup themeable
  */
 #}
-  <item>
-    <title>{{ title }}</title>
-    <link>{{ link }}</link>
-    <description>{{ description }}</description>
-    {{ item_elements }}
-  </item>
+<item>
+  <title>{{ title }}</title>
+  <link>{{ link }}</link>
+  <description>{{ description }}</description>
+  {% for item in item_elements -%}
+    <{{ item.key }}{{ item.attributes -}}
+    {% if item.value -%}
+      >{{ item.value }}</{{ item.key }}>
+    {% else -%}
+      {{ ' />' }}
+    {% endif %}
+  {%- endfor %}
+</item>
diff --git a/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_display_feed.yml b/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_display_feed.yml
index a88f655..4b54199 100644
--- a/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_display_feed.yml
+++ b/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_display_feed.yml
@@ -95,6 +95,31 @@ display:
     display_title: Feed
     id: feed_1
     position: 0
+  feed_2:
+    display_options:
+      displays: {  }
+      pager:
+        type: some
+      path: test-feed-display-fields.xml
+      row:
+        type: rss_fields
+        options:
+          title_field: title
+          link_field: title
+          description_field: title
+          creator_field: title
+          date_field: title
+          guid_field_options:
+            guid_field: title
+            guid_field_is_permalink: true
+      style:
+        type: rss
+      sitename_title: true
+      display_description: ''
+    display_plugin: feed
+    display_title: 'Feed with Fields'
+    id: feed_2
+    position: 0
   page:
     display_options:
       path: test-feed-display
diff --git a/core/modules/views/views.theme.inc b/core/modules/views/views.theme.inc
index a3d8d4a..fd68580 100644
--- a/core/modules/views/views.theme.inc
+++ b/core/modules/views/views.theme.inc
@@ -912,11 +912,16 @@ function template_preprocess_views_view_rss(&$variables) {
  */
 function template_preprocess_views_view_row_rss(&$variables) {
   $item = $variables['row'];
-
-  $variables['title'] = String::checkPlain($item->title);
+  $variables['title'] = $item->title;
   $variables['link'] = $item->link;
-  $variables['description'] = String::checkPlain($item->description);
-  $variables['item_elements'] = empty($item->elements) ? '' : format_xml_elements($item->elements);
+  $variables['description'] = $item->description;
+  $variables['item_elements'] = array();
+  foreach ($item->elements as $element) {
+    if (isset($element['attributes']) && is_array($element['attributes'])) {
+      $element['attributes'] = new Attribute($element['attributes']);
+    }
+    $variables['item_elements'][] = $element;
+  }
 }
 
 /**
