From 5bc593b4b0f6981a01d61c6da325631a041353cc Mon Sep 17 00:00:00 2001 From: sparkyx Date: Sat, 24 Jan 2026 09:48:36 +0100 Subject: [PATCH] Fix Bug : XML UBL21 fails if customer name contains an ampersand --- include/XMLDocument/invoiceubl21.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/XMLDocument/invoiceubl21.class.php b/include/XMLDocument/invoiceubl21.class.php index cc3ce03fd..0d7fa1605 100644 --- a/include/XMLDocument/invoiceubl21.class.php +++ b/include/XMLDocument/invoiceubl21.class.php @@ -235,7 +235,7 @@ class InvoiceUBL21 extends XMLInvoice { // LegalEntity $ple=$this->createElement('cac:PartyLegalEntity'); ///@todo customer = name doit être fiche - $ple->appendChild($this->createElement("cbc:RegistrationName", $this->data['customer']['name']??"ERROR")); + $ple->appendChild($this->createElement("cbc:RegistrationName", htmlspecialchars($this->data['customer']['name'],ENT_XML1,'UTF-8'))); ///@todo customer_vat_id = numéro de TVA doit être dans fiche $ple->appendChild($this->createElement("cbc:CompanyID", $this->data['customer']['customer_vat_id']??"ERROR"));