MDL-72856 lib: Only inject one robots/noindex in head of Additional HTML

This commit is contained in:
Michael Milette
2024-09-04 12:32:01 -04:00
parent 6a7b69a30a
commit e55e9974b8
+3 -1
View File
@@ -792,7 +792,9 @@ class core_renderer extends renderer_base {
if (!isset($CFG->additionalhtmlhead)) {
$CFG->additionalhtmlhead = '';
}
$CFG->additionalhtmlhead .= '<meta name="robots" content="noindex" />';
if (stripos($CFG->additionalhtmlhead, '<meta name="robots" content="noindex" />') === false) {
$CFG->additionalhtmlhead .= '<meta name="robots" content="noindex" />';
}
}
if (!empty($CFG->additionalhtmlhead)) {