diff --git a/core/modules/ckeditor/src/Tests/CKEditorTest.php b/core/modules/ckeditor/src/Tests/CKEditorTest.php index dd9a7bf..2888ecd 100644 --- a/core/modules/ckeditor/src/Tests/CKEditorTest.php +++ b/core/modules/ckeditor/src/Tests/CKEditorTest.php @@ -123,11 +123,16 @@ function testGetJSSettings() { // Change the allowed HTML tags; the "allowedContent" and "format_tags" // settings for CKEditor should automatically be updated as well. $format = $editor->getFilterFormat(); - $format->filters('filter_html')->settings['allowed_html'] .= '
 

'; + $filters = $format->filters('filter_html')->settings['allowed_html'] .= '
 

'; + $filters = str_replace('

','

', $filters); + $format->filters('filter_html')->settings['allowed_html'] = $filters; $format->save(); $expected_config['allowedContent']['pre'] = array('attributes' => FALSE, 'styles' => FALSE, 'classes' => FALSE); $expected_config['allowedContent']['h1'] = array('attributes' => FALSE, 'styles' => FALSE, 'classes' => FALSE); + // Since the class tag is configured to be white listed, all classes should + // be allowed. + $expected_config['allowedContent']['p'] = array('attributes' => 'class', 'styles' => FALSE, 'classes' => '*'); $expected_config['format_tags'] = 'p;h1;h2;h3;h4;h5;h6;pre'; ksort($expected_config['allowedContent']); $this->assertIdentical($expected_config, $this->castSafeStrings($this->ckeditor->getJSSettings($editor)), 'Generated JS settings are correct for customized configuration.');