.../editor/lib/Drupal/editor/EditorXssFilterInterface.php | 4 ++-- .../editor/lib/Drupal/editor/Tests/EditorSecurityTest.php | 6 +++--- .../tests/Drupal/editor/Tests/EditorXssFilter/StandardTest.php | 3 ++- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/core/modules/editor/lib/Drupal/editor/EditorXssFilterInterface.php b/core/modules/editor/lib/Drupal/editor/EditorXssFilterInterface.php index e85372c..7575ab2 100644 --- a/core/modules/editor/lib/Drupal/editor/EditorXssFilterInterface.php +++ b/core/modules/editor/lib/Drupal/editor/EditorXssFilterInterface.php @@ -21,8 +21,8 @@ * * Is only called when: * - loading a non-XSS-safe text editor for a $format that contains a filter - * preventing XSS attacks (a FILTER_TYPE_HTML_RESTRICTOR filter): if the - * output is safe, it should also be safe to edit. + * preventing XSS attacks (a FilterInterface::TYPE_HTML_RESTRICTOR filter): + * if the output is safe, it should also be safe to edit. * - loading a non-XSS-safe text editor for a $format that doesn't contain a * filter preventing XSS attacks, but we're switching from a previous text * format ($original_format is not NULL) that did prevent XSS attacks: if diff --git a/core/modules/editor/lib/Drupal/editor/Tests/EditorSecurityTest.php b/core/modules/editor/lib/Drupal/editor/Tests/EditorSecurityTest.php index bb2df1d..52a6de5 100644 --- a/core/modules/editor/lib/Drupal/editor/Tests/EditorSecurityTest.php +++ b/core/modules/editor/lib/Drupal/editor/Tests/EditorSecurityTest.php @@ -68,7 +68,7 @@ function setUp() { 'name' => 'Restricted HTML, without text editor', 'weight' => 0, 'filters' => array( - // A filter of the FILTER_TYPE_HTML_RESTRICTOR type. + // A filter of the FilterInterface::TYPE_HTML_RESTRICTOR type. 'filter_html' => array( 'status' => 1, 'settings' => array( @@ -83,7 +83,7 @@ function setUp() { 'name' => 'Restricted HTML, with text editor', 'weight' => 1, 'filters' => array( - // A filter of the FILTER_TYPE_HTML_RESTRICTOR type. + // A filter of the FilterInterface::TYPE_HTML_RESTRICTOR type. 'filter_html' => array( 'status' => 1, 'settings' => array( @@ -103,7 +103,7 @@ function setUp() { 'name' => 'Restricted HTML, dangerous tag allowed, with text editor', 'weight' => 1, 'filters' => array( - // A filter of the FILTER_TYPE_HTML_RESTRICTOR type. + // A filter of the FilterInterface::TYPE_HTML_RESTRICTOR type. 'filter_html' => array( 'status' => 1, 'settings' => array( diff --git a/core/modules/editor/tests/Drupal/editor/Tests/EditorXssFilter/StandardTest.php b/core/modules/editor/tests/Drupal/editor/Tests/EditorXssFilter/StandardTest.php index bce3073..1557bbc 100644 --- a/core/modules/editor/tests/Drupal/editor/Tests/EditorXssFilter/StandardTest.php +++ b/core/modules/editor/tests/Drupal/editor/Tests/EditorXssFilter/StandardTest.php @@ -8,6 +8,7 @@ namespace Drupal\editor\Tests\editor\EditorXssFilter; use Drupal\Tests\UnitTestCase; +use Drupal\filter\Plugin\FilterInterface; /** * Tests the standard text editor XSS filter. @@ -50,7 +51,7 @@ protected function setUp() { ->getMock(); $this->format->expects($this->any()) ->method('getFilterTypes') - ->will($this->returnValue(array(FILTER_TYPE_HTML_RESTRICTOR))); + ->will($this->returnValue(array(FilterInterface::TYPE_HTML_RESTRICTOR))); $restrictions = array( 'allowed' => array( 'p' => TRUE,