[#26184] Don't render meta elements without content

git-svn-id: http://joomlacode.org/svn/joomla/development/trunk@21567 6f6e1ebd-4c2b-0410-823f-f34bde69bce9
This commit is contained in:
Christophe Demko 2011-06-19 13:01:41 +00:00
parent 56570a1f30
commit 606aa3601f
3 changed files with 3 additions and 5 deletions

View File

@ -171,10 +171,7 @@ final class JSite extends JApplication
} else {
$document->setMetaData('keywords', $this->getCfg('MetaKeys'));
}
$rights = $this->getCfg('MetaRights');
if ($rights) {
$document->setMetaData('rights', $rights);
}
$document->setMetaData('rights', $this->getCfg('MetaRights'));
if ($router->getMode() == JROUTER_MODE_SEF) {
$document->setBase(JURI::current());
}

View File

@ -29,6 +29,7 @@ $ -> Language fix or change
19-Jun-2011 Christophe Demko
# [#25116] icon as image file instead of document in media manager
# [#26184] Don't render meta elements without content (Rouven Weßling)
18-Jun-2011 Jean-Marie Simonet
# [#26179] Joomla 1.7.0 find updates and proposes 1.6.3. Thanks Christophe

View File

@ -66,7 +66,7 @@ class JDocumentRendererHead extends JDocumentRenderer
$content.= '; charset=' . $document->getCharset();
$buffer .= $tab.'<meta http-equiv="'.$name.'" content="'.htmlspecialchars($content).'"'.$tagEnd.$lnEnd;
}
else if ($type == 'standard') {
else if ($type == 'standard' && !empty($content)) {
$buffer .= $tab.'<meta name="'.$name.'" content="'.htmlspecialchars($content).'"'.$tagEnd.$lnEnd;
}
}