only in patch2: unchanged: --- a/core/modules/views_ui/src/Tests/DisplayPathTest.php +++ b/core/modules/views_ui/src/Tests/DisplayPathTest.php @@ -33,6 +33,7 @@ class DisplayPathTest extends UITestBase { public function testPathUI() { $this->doBasicPathUITest(); $this->doAdvancedPathsValidationTest(); + $this->doPathXssFilterTest(); } /** @@ -58,6 +59,20 @@ protected function doBasicPathUITest() { } /** + * Tests that View paths are properly filtered for XSS. + */ + public function doPathXssFilterTest() { + $this->drupalGet('admin/structure/views/view/test_view'); + $this->drupalPostForm(NULL, array(), 'Add Page'); + $this->drupalPostForm('admin/structure/views/nojs/display/test_view/page_1/path', array('path' => 'malformed_path'), t('Apply')); + $this->drupalPostForm(NULL, array(), 'Add Page'); + $this->drupalPostForm('admin/structure/views/nojs/display/test_view/page_2/path', array('path' => ''), t('Apply')); + $this->drupalPostForm('admin/structure/views/view/test_view', array(), t('Save')); + $this->drupalGet('admin/structure/views'); + $this->assertRaw('/<object>malformed_path</object>, /<script>alert("hello");</script>', 'Two paths were filtered for XSS.'); + } + + /** * Tests a couple of invalid path patterns. */ protected function doAdvancedPathsValidationTest() {