diff --git a/core/modules/search/src/Tests/SearchPageTextTest.php b/core/modules/search/src/Tests/SearchPageTextTest.php
index ad311d6..9126b19 100644
--- a/core/modules/search/src/Tests/SearchPageTextTest.php
+++ b/core/modules/search/src/Tests/SearchPageTextTest.php
@@ -31,6 +31,20 @@ protected function setUp() {
   }
 
   /**
+   * Tests for XSS in search module local menu task label.
+   */
+  function testSearchLabelXSS() {
+    $this->drupalLogin($this->drupalCreateUser(array('administer search')));
+
+    $keys['label'] = '<script>alert("Dont Panic");</script>';
+    $this->drupalPostForm('admin/config/search/pages/manage/node_search', $keys, t('Save search page'));
+
+    $this->drupalLogin($this->searchingUser);
+    $this->drupalGet('search/node');
+    $this->assertEscaped($keys['label']);
+  }
+
+  /**
    * Tests the failed search text, and various other text on the search page.
    */
   function testSearchText() {
@@ -135,6 +149,5 @@ function testSearchText() {
     $this->drupalPostForm('search/node', array('keys' => '.something'), t('Search'));
     $this->assertResponse(200, 'Searching for .something does not lead to a 403 error');
     $this->assertText('no results', 'Searching for .something gives you a no search results page');
-
   }
 }
