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

This commit is contained in:
Michael Milette
2024-09-04 12:34:04 -04:00
parent d14f5eaa6c
commit dd94fb1f8c
+3 -1
View File
@@ -776,7 +776,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)) {