Skip to content
Snippets Groups Projects
Commit d1fadb33 authored by catch's avatar catch
Browse files

Issue #3496405 by spokje: [random test failure] EditorSecurityTest::testEditorXssFilterOverride

(cherry picked from commit 6e3f47d7)
parent 73a1a827
No related branches found
No related tags found
No related merge requests found
Pipeline #383650 passed
...@@ -63,7 +63,7 @@ function editor_test_editor_js_settings_alter(&$settings) { ...@@ -63,7 +63,7 @@ function editor_test_editor_js_settings_alter(&$settings) {
*/ */
function editor_test_editor_xss_filter_alter(&$editor_xss_filter_class, FilterFormatInterface $format, ?FilterFormatInterface $original_format = NULL) { function editor_test_editor_xss_filter_alter(&$editor_xss_filter_class, FilterFormatInterface $format, ?FilterFormatInterface $original_format = NULL) {
// Allow tests to enable or disable this alter hook. // Allow tests to enable or disable this alter hook.
if (!\Drupal::state()->get('editor_test_editor_xss_filter_alter_enabled', FALSE)) { if (!\Drupal::keyValue('editor_test')->get('editor_xss_filter_alter_enabled', FALSE)) {
return; return;
} }
......
...@@ -436,9 +436,9 @@ public function testEditorXssFilterOverride(): void { ...@@ -436,9 +436,9 @@ public function testEditorXssFilterOverride(): void {
$this->drupalGet('node/2/edit'); $this->drupalGet('node/2/edit');
$this->assertSession()->fieldValueEquals('edit-body-0-value', self::$sampleContentSecured); $this->assertSession()->fieldValueEquals('edit-body-0-value', self::$sampleContentSecured);
// Enable editor_test.module's hook_editor_xss_filter_alter() implementation // Enable editor_test's hook_editor_xss_filter_alter() implementation
// to alter the text editor XSS filter class being used. // to alter the text editor XSS filter class being used.
\Drupal::state()->set('editor_test_editor_xss_filter_alter_enabled', TRUE); \Drupal::keyValue('editor_test')->set('editor_xss_filter_alter_enabled', TRUE);
// First: the Insecure text editor XSS filter. // First: the Insecure text editor XSS filter.
$this->drupalGet('node/2/edit'); $this->drupalGet('node/2/edit');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment