diff --git a/htdocs/product.class.php b/htdocs/product.class.php index 37de0243aba..73f77ae0706 100644 --- a/htdocs/product.class.php +++ b/htdocs/product.class.php @@ -208,9 +208,9 @@ class Product if (! $this->libelle) $this->libelle = 'LIBELLE MANQUANT'; $this->ref = trim(sanitize_string($this->ref)); - $this->libelle = trim($this->libelle); - $this->description = trim($this->description); - $this->note = trim($this->note); + $this->libelle = trim(addslashes($this->libelle)); + $this->description = trim(addslashes($this->description)); + $this->note = trim(addslashes($this->note)); $sql = "UPDATE ".MAIN_DB_PREFIX."product "; $sql .= " SET label = '" . addslashes($this->libelle) ."'"; diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index 88e4394dfc2..e866b942239 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -121,7 +121,7 @@ if ($_POST["action"] == 'update' && $product->ref = stripslashes($_POST["ref"]); $product->libelle = stripslashes($_POST["libelle"]); if ( isset( $_POST["price"] ) ) - $product->price = stripslashes($_POST["price"]); + $product->price = stripslashes($_POST["price"]); $product->tva_tx = $_POST["tva_tx"]; $product->description = stripslashes($_POST["desc"]); $product->note = stripslashes($_POST["note"]);