From 171f01bd0b640c4d9e05ab657215701a409ed502 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Tue, 24 Jul 2018 10:07:51 +0000 Subject: [PATCH] fix #2154 @0.25 --- inc/ws/Util/html5/master/class.ws.html5.seo.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/inc/ws/Util/html5/master/class.ws.html5.seo.php b/inc/ws/Util/html5/master/class.ws.html5.seo.php index 4890796db..56e60160b 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.seo.php +++ b/inc/ws/Util/html5/master/class.ws.html5.seo.php @@ -19,7 +19,7 @@ class wsHTML5Seo foreach ($compiler->pages as $page => $infos) { $p = new wsHTML5SeoPage($this); $p->page = $page; - $p->title = $this->_getPageLabel($page); + $p->title = ($page == 1) ? $this->compiler->book->parametres->title : $this->_getPageLabel($page); $p->text = $this->getTextContent($infos); $p->description = $this->compiler->book->parametres->seoDescription ? $this->compiler->book->parametres->seoDescription : $this->compiler->book->parametres->title . ' - Powered by Fluidbook'; $p->keywords = $this->compiler->book->parametres->seoKeywords; @@ -28,7 +28,12 @@ class wsHTML5Seo // Google analytics $p->ua = ''; if ($this->compiler->book->parametres->googleAnalytics != '') { - $p->ua .= cubePage::googleAnalytics($this->compiler->book->parametres->googleAnalytics); + $codes = explode(',', $this->compiler->book->parametres->googleAnalytics); + $p->ua .= "\n\t"; } if ($this->compiler->book->parametres->googleAnalyticsCustom != '') { $p->ua .= $this->compiler->book->parametres->googleAnalyticsCustom; @@ -80,7 +85,10 @@ class wsHTML5Seo break; } - return file_get_contents(wsDocument::getDir($infos['document_id']) . $prefix . 'h' . $infos['document_page'] . '.txt'); + $res = trim(file_get_contents(wsDocument::getDir($infos['document_id']) . $prefix . 'h' . $infos['document_page'] . '.txt')); + $res = preg_replace('|\<\/div\>$|', '', $res); + + return $res; } public function _getPageLabel($page) @@ -163,6 +171,8 @@ class wsHTML5SeoPage public function getSEOContent() { + + $res = ''; if (null !== $this->h1) { $res .= '

' . htmlentities($this->h1) . '

'; -- 2.39.5