From 96ddebad4acbb2d21f76d9c2c584daf75a9ef361 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 15 Oct 2018 17:48:39 +0200 Subject: [PATCH] Set canonical tag --- htdocs/core/lib/website.lib.php | 1 + htdocs/website/index.php | 1 + 2 files changed, 2 insertions(+) diff --git a/htdocs/core/lib/website.lib.php b/htdocs/core/lib/website.lib.php index fc2a90bbeb1..42ed566915f 100644 --- a/htdocs/core/lib/website.lib.php +++ b/htdocs/core/lib/website.lib.php @@ -624,6 +624,7 @@ function dolSavePageContent($filetpl, $object, $objectpage) $tplcontent.= ''."\n"; $tplcontent.= ''."\n"; $tplcontent.= ''."\n"; + $tplcontent.= ''."\n"; $tplcontent.= ''."\n"; $tplcontent.= ''."\n"; $tplcontent.= ''."\n"; diff --git a/htdocs/website/index.php b/htdocs/website/index.php index e9e14c4f888..dc8209bcb01 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -459,6 +459,7 @@ if ($action == 'addcontainer') //$objectpage->htmlheader = preg_replace('/]*>\n/ims', '', $objectpage->htmlheader); + $objectpage->htmlheader = preg_replace('/]*rel="canonical[^>]*>\n/ims', '', $objectpage->htmlheader); // Now loop to fetch JS $tmp = $objectpage->htmlheader;