summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcatch2011-11-18 15:06:47 (GMT)
committercatch2011-11-18 15:06:47 (GMT)
commitb9c47a3f469b0a95f78a03b9798796e261bc2ec6 (patch)
tree0957bbccaca520219f2bc44175e2680dbde834a8
parent9f25d6a592782db91b7156cdec4424a4c76c21c1 (diff)
Issue #1174756 by linclark, karschsp, amateescu, rupl: Convert <head> markup to HTML5.
-rw-r--r--core/includes/common.inc7
-rw-r--r--core/modules/simpletest/drupal_web_test_case.php2
-rw-r--r--core/modules/simpletest/tests/common.test2
3 files changed, 3 insertions, 8 deletions
diff --git a/core/includes/common.inc b/core/includes/common.inc
index f8d1aab..919bfb5 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -299,8 +299,7 @@ function _drupal_default_html_head() {
'#type' => 'html_tag',
'#tag' => 'meta',
'#attributes' => array(
- 'http-equiv' => 'Content-Type',
- 'content' => 'text/html; charset=utf-8',
+ 'charset' => 'utf-8',
),
// Security: This always has to be output first.
'#weight' => -1000,
@@ -3198,16 +3197,12 @@ function drupal_pre_render_styles($elements) {
'#type' => 'html_tag',
'#tag' => 'link',
'#attributes' => array(
- 'type' => 'text/css',
'rel' => 'stylesheet',
),
);
$style_element_defaults = array(
'#type' => 'html_tag',
'#tag' => 'style',
- '#attributes' => array(
- 'type' => 'text/css',
- ),
);
// Loop through each group.
diff --git a/core/modules/simpletest/drupal_web_test_case.php b/core/modules/simpletest/drupal_web_test_case.php
index 9d993d4..ca66143 100644
--- a/core/modules/simpletest/drupal_web_test_case.php
+++ b/core/modules/simpletest/drupal_web_test_case.php
@@ -1682,7 +1682,7 @@ class DrupalWebTestCase extends DrupalTestCase {
// DOM can load HTML soup. But, HTML soup can throw warnings, suppress
// them.
$htmlDom = new DOMDocument();
- @$htmlDom->loadHTML($this->drupalGetContent());
+ @$htmlDom->loadHTML('<?xml encoding="UTF-8">' . $this->drupalGetContent());
if ($htmlDom) {
$this->pass(t('Valid HTML found on "@path"', array('@path' => $this->getUrl())), t('Browser'));
// It's much easier to work with simplexml than DOM, luckily enough
diff --git a/core/modules/simpletest/tests/common.test b/core/modules/simpletest/tests/common.test
index 78da5e4..a5ab249 100644
--- a/core/modules/simpletest/tests/common.test
+++ b/core/modules/simpletest/tests/common.test
@@ -669,7 +669,7 @@ class CascadingStylesheetsTestCase extends DrupalWebTestCase {
*/
function testRenderInlinePreprocess() {
$css = 'body { padding: 0px; }';
- $css_preprocessed = '<style type="text/css" media="all">' . "\n<!--/*--><![CDATA[/*><!--*/\n" . drupal_load_stylesheet_content($css, TRUE) . "\n/*]]>*/-->\n" . '</style>';
+ $css_preprocessed = '<style media="all">' . "\n<!--/*--><![CDATA[/*><!--*/\n" . drupal_load_stylesheet_content($css, TRUE) . "\n/*]]>*/-->\n" . '</style>';
drupal_add_css($css, array('type' => 'inline'));
$styles = drupal_get_css();
$this->assertEqual(trim($styles), $css_preprocessed, t('Rendering preprocessed inline CSS adds it to the page.'));