diff --git a/core/includes/common.inc b/core/includes/common.inc index c47494e8827..e7ebd1f4cdd 100644 --- a/core/includes/common.inc +++ b/core/includes/common.inc @@ -4012,9 +4012,6 @@ function drupal_pre_render_scripts($elements) { '#type' => 'html_tag', '#tag' => 'script', '#value' => '', - '#attributes' => array( - 'type' => 'text/javascript', - ), ); // Loop through each group. diff --git a/core/modules/filter/lib/Drupal/filter/Tests/FilterUnitTest.php b/core/modules/filter/lib/Drupal/filter/Tests/FilterUnitTest.php index 7dab9f6c6df..250b583a1bf 100644 --- a/core/modules/filter/lib/Drupal/filter/Tests/FilterUnitTest.php +++ b/core/modules/filter/lib/Drupal/filter/Tests/FilterUnitTest.php @@ -859,15 +859,15 @@ www.example.com with a newline in comments --> $f = _filter_htmlcorrector('

دروبال'); $this->assertEqual($f, '

دروبال

', t('HTML corrector -- Encoding is correctly kept.')); - $f = _filter_htmlcorrector(''); - $this->assertEqual($f, ''); + $this->assertEqual($f, '', t('HTML corrector -- CDATA added to script element')); - $f = _filter_htmlcorrector('

'); - $this->assertEqual($f, '

'); + $this->assertEqual($f, '

'); - $this->assertEqual($filtered_data, '

' . "\n"; + $expected_1 = ""; + $expected_2 = "\n" . '' . "\n"; $this->assertTrue(strpos($javascript, $expected_1) > 0, t('Rendered JavaScript within downlevel-hidden conditional comments.')); $this->assertTrue(strpos($javascript, $expected_2) > 0, t('Rendered JavaScript within downlevel-revealed conditional comments.')); @@ -299,10 +299,10 @@ class JavaScriptTest extends WebTestBase { drupal_add_js('core/misc/batch.js', array('every_page' => TRUE)); $javascript = drupal_get_js(); $expected = implode("\n", array( - '', - '', - '', - '', + '', + '', + '', + '', )); $this->assertTrue(strpos($javascript, $expected) > 0, t('Unaggregated JavaScript is added in the expected group order.')); @@ -320,8 +320,8 @@ class JavaScriptTest extends WebTestBase { $js_items = drupal_add_js(); $javascript = drupal_get_js(); $expected = implode("\n", array( - '', - '', + '', + '', )); $this->assertTrue(strpos($javascript, $expected) !== FALSE, t('JavaScript is aggregated in the expected groups and order.')); }