]> _ Git - cubeextranet.git/commitdiff
wip #4286 @1
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 22 Feb 2021 17:51:03 +0000 (17:51 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 22 Feb 2021 17:51:03 +0000 (17:51 +0000)
inc/ws/Controlleur/class.ws.ajax.php
inc/ws/Util/html5/master/class.ws.html5.compiler.php

index bb9c1477d5aa86abfb5123c9be984099ce99cc2f..78a3edb4a445557ab3f2dd9fc7988c353a398dae 100644 (file)
@@ -512,6 +512,12 @@ class wsAjax extends cubeAjax
 
         $_POST = array_merge($defaults, $_POST);
 
+        foreach ($_POST as $k => $v) {
+            if (!is_array($v)) {
+                $_POST[$k] = htmlspecialchars($v);
+            }
+        }
+
 
         if (!self::valideDemandeDevis($x)) {
             $x->addAlert(sprintf(__("Une erreur s'est produite. Nous avons été averti de l'erreur que vous rencontrez. Vous pouvez nous contacter par e-mail à l'adresse suivante : %s"), '<a href="mailto:info@fluidbook.com">info@fluidbook.com</a>'));
index c81cc4f1a1f1abff378c3da63881187f9f092eed..5d9689808e4f234934c48c475c26d4cbb51bb1c6 100644 (file)
@@ -136,6 +136,7 @@ class wsHTML5Compiler
         'js/widget.js'
     );
 
+
     public $jsFiles = [];
 
     // Collection of LESS files to be compiled
@@ -323,6 +324,9 @@ class wsHTML5Compiler
             $this->initMobileFirst();
         }
 
+        $this->svgfiles = array($this->assets . '/images/symbols/interface.svg',
+            WS_ICONS . '/' . $this->theme->parametres->iconSet . '/interface.svg');
+
         if ($this->book->parametres->zoomMode == 1 || $this->isMobileFirst()) {
             $this->multiply = $this->pdf2htmlRatio * $this->scale * $this->cssOneScale;
         } else {
@@ -429,6 +433,7 @@ class wsHTML5Compiler
         $this->addJsLib('grandvision', 'js/libs/fluidbook/cart/fluidbook.cart.grandvision.js');
         $this->addJsLib('html2pdf', 'js/libs/html2pdf/html2pdf.min.js');
         $this->addJsLib('multiselect', 'js/libs/jquery/jquery.multi-select.js');
+        $this->svgfiles[] = $this->assets . '/images/symbols/grandvision.svg';
 
         $cdir = $this->wdir . '/commerce/';
         $file = $cdir . $this->book->parametres->basketReferences;
@@ -439,7 +444,7 @@ class wsHTML5Compiler
             mkdir($odir, 0777, true);
         }
 
-        $it = CubeIT_Files::getDirectoryIterator($cdir );
+        $it = CubeIT_Files::getDirectoryIterator($cdir);
         $exts = ['png', 'jpg', 'tif', 'mp4'];
         foreach ($it as $file) {
 
@@ -1257,9 +1262,9 @@ class wsHTML5Compiler
                 $this->theme->parametres->iconSet = 15;
             }
 
-            $svgfiles = array($this->assets . '/images/interface.svg', WS_ICONS . '/' . $this->theme->parametres->iconSet . '/interface.svg');
+
             $svg = '';
-            foreach ($svgfiles as $svgfile) {
+            foreach ($this->svgfiles as $svgfile) {
                 if (file_exists($svgfile)) {
                     $svg .= str_replace('$bookmark-color', wsHTML5::colorToCSS($this->theme->parametres->bookmarkBackgroundColor), file_get_contents($svgfile));
                 } else {