From dd94fb1f8c232bd5ef869997f18fd31bc7629898 Mon Sep 17 00:00:00 2001 From: Michael Milette Date: Sun, 18 Feb 2024 20:34:55 -0500 Subject: [PATCH] MDL-72856 lib: Only inject one robots/noindex in head of Additional HTML --- lib/outputrenderers.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/outputrenderers.php b/lib/outputrenderers.php index 8bcd9b44e7a..add05e0a04a 100644 --- a/lib/outputrenderers.php +++ b/lib/outputrenderers.php @@ -776,7 +776,9 @@ class core_renderer extends renderer_base { if (!isset($CFG->additionalhtmlhead)) { $CFG->additionalhtmlhead = ''; } - $CFG->additionalhtmlhead .= ''; + if (stripos($CFG->additionalhtmlhead, '') === false) { + $CFG->additionalhtmlhead .= ''; + } } if (!empty($CFG->additionalhtmlhead)) {