From c22f6be76eea1daa4b51d6156de47413dbfb7e86 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Wed, 7 Feb 2018 15:42:59 +0000 Subject: [PATCH] #1934 --- inc/ws/Util/html5/master/class.ws.html5.compiler.php | 5 ++--- inc/ws/Util/html5/master/class.ws.html5.links.php | 11 ++++++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/inc/ws/Util/html5/master/class.ws.html5.compiler.php b/inc/ws/Util/html5/master/class.ws.html5.compiler.php index 86484d626..1fb4700e2 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/master/class.ws.html5.compiler.php @@ -1451,9 +1451,8 @@ class wsHTML5Compiler { if (!isset($this->book->parametres->bookmarkCornerSize)) { $this->book->parametres->bookmarkCornerSize = 10; } - $size = round($this->width * $this->book->parametres->bookmarkCornerSize * 0.0075 * $this->z); - $res[] = '#links .bookmark{width:' . $size . 'px;height:' . $size . 'px;background-size:' . $size . 'px ' . $size . 'px;}'; - $res[] = '.portrait #fluidbook .bookmark.left{left:' . ($cssWidth - $size) . 'px;}'; + $lessVariables['bookmark-corner-size'] = round($this->width * $this->book->parametres->bookmarkCornerSize * 0.0075 * $this->z) . 'px'; + $lessVariables['bookmark-corner-offset'] = $this->book->parametres->bookmarkOffset . 'px'; // Menus $menuColor = new CubeIT_Graphics_Color($this->theme->parametres->couleurB); diff --git a/inc/ws/Util/html5/master/class.ws.html5.links.php b/inc/ws/Util/html5/master/class.ws.html5.links.php index d04bfda46..fbb2b0c1d 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.links.php +++ b/inc/ws/Util/html5/master/class.ws.html5.links.php @@ -231,7 +231,7 @@ class wsHTML5Link { } public function unzipFile($file, $moveAssets = false) { - return $this->compiler->unzipFile($file, $moveAssets); + return $this->compiler->unzipFile($file, $moveAssets); } public function getCssScale() { @@ -749,8 +749,13 @@ class actionLink extends internalLink { public function getAdditionnalContent() { $res = parent::getAdditionnalContent(); - if ($this->extra) { - $res .= ' data-extra="' . $this->extra . '"'; + if (is_object($this->extra) || is_array($this->extra)) { + $extra = json_encode($this->extra); + } else { + $extra = $this->extra; + } + if ($extra) { + $res .= ' data-extra="' . htmlspecialchars($extra, ENT_QUOTES) . '"'; } if (in_array($this->to, $this->_share)) { -- 2.39.5