diff --git a/libraries/joomla/document/renderer/html/head.php b/libraries/joomla/document/renderer/html/head.php
index dda6fe2dd6e8b..fd743e289ea02 100644
--- a/libraries/joomla/document/renderer/html/head.php
+++ b/libraries/joomla/document/renderer/html/head.php
@@ -127,12 +127,14 @@ public function fetchHead($document)
$buffer .= ' />' . $lnEnd;
}
+ $defaultCssMimes = array('text/css');
+
// Generate stylesheet links
foreach ($document->_styleSheets as $strSrc => $strAttr)
{
$buffer .= $tab . 'isHtml5() || $strAttr['mime'] != 'text/css'))
+ if (!is_null($strAttr['mime']) && (!$document->isHtml5() || !in_array($strAttr['mime'], $defaultCssMimes)))
{
$buffer .= ' type="' . $strAttr['mime'] . '"';
}
@@ -156,7 +158,14 @@ public function fetchHead($document)
// Generate stylesheet declarations
foreach ($document->_style as $type => $content)
{
- $buffer .= $tab . '' . $lnEnd;
}
+ $defaultJsMimes = array('text/javascript', 'application/javascript', 'text/x-javascript', 'application/x-javascript');
+
// Generate script file links
foreach ($document->_scripts as $strSrc => $strAttr)
{
$buffer .= $tab . '