diff --git a/core/tests/Drupal/Tests/Component/Utility/XssTest.php b/core/tests/Drupal/Tests/Component/Utility/XssTest.php
index 7ca4be8..a212112 100644
--- a/core/tests/Drupal/Tests/Component/Utility/XssTest.php
+++ b/core/tests/Drupal/Tests/Component/Utility/XssTest.php
@@ -544,6 +544,17 @@ public function testFilterXssAdminNotNormalized($value, $expected, $message) {
   }
 
   /**
+   * Checks that Checks that \Drupal\Component\Utility\Xss::filter()
+   * doesn't alter attributes.
+   */
+  public function testFilterXSSAttributes() {
+    $img1 = '<img src="/some/path/image.png" title="One:Two" alt="One:Two">';
+    $this->assertEquals(Xss::filter($img1, ['img']), $img1, 'Attributes OK');
+    $img2 = '<img src="/some/path/image.png" title="One:Two" alt="One:Two" typeof="foaf:Image">';
+    $this->assertEquals(Xss::filter($img2, ['img']), $img2, 'Attributes OK');
+  }
+
+  /**
    * Data provider for testFilterXssAdminNotNormalized().
    *
    * @see testFilterXssAdminNotNormalized()
