diff --git a/includes/common.inc b/includes/common.inc
index d0649d7..a344ee7 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -310,8 +310,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,
@@ -3223,16 +3222,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.
@@ -4138,9 +4133,7 @@ function drupal_get_js($scope = 'header', $javascript = NULL, $skip_alter = FALS
   $element = array(
     '#tag' => 'script',
     '#value' => '',
-    '#attributes' => array(
-      'type' => 'text/javascript',
-    ),
+    '#attributes' => array(),
   );
   foreach ($items as $item) {
     $query_string =  empty($item['version']) ? $default_query_string : $js_version_string . $item['version'];
diff --git a/modules/simpletest/drupal_web_test_case.php b/modules/simpletest/drupal_web_test_case.php
index 40af458..73c2788 100644
--- a/modules/simpletest/drupal_web_test_case.php
+++ b/modules/simpletest/drupal_web_test_case.php
@@ -1677,7 +1677,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/modules/simpletest/tests/common.test b/modules/simpletest/tests/common.test
index 177e457..3d40ff7 100644
--- a/modules/simpletest/tests/common.test
+++ b/modules/simpletest/tests/common.test
@@ -653,7 +653,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.'));
