diff --git a/core-bundle/src/Resources/contao/pages/PageRegular.php b/core-bundle/src/Resources/contao/pages/PageRegular.php index c0e20167c7f..00cf842b9cf 100644 --- a/core-bundle/src/Resources/contao/pages/PageRegular.php +++ b/core-bundle/src/Resources/contao/pages/PageRegular.php @@ -230,12 +230,12 @@ protected function prepare($objPage) $this->Template->pageTitle = str_replace('[-]', '', $this->Template->pageTitle); // Meta robots tag - $this->Template->robots = $headBag->getMetaRobots(); + $this->Template->robots = htmlspecialchars($headBag->getMetaRobots()); // Canonical if ($objPage->enableCanonical) { - $this->Template->canonical = $headBag->getCanonicalUriForRequest($request); + $this->Template->canonical = htmlspecialchars($headBag->getCanonicalUriForRequest($request)); } // Fall back to the default title tag