diff --git a/bundle/Controller/DownloadController.php b/bundle/Controller/DownloadController.php index 2acdaaf..a30a714 100644 --- a/bundle/Controller/DownloadController.php +++ b/bundle/Controller/DownloadController.php @@ -82,7 +82,7 @@ public function downloadCollectedEnhancedEzBinaryFileAction($infocollectionAttri $filePath = $filePathNodes->item(0)->textContent; $fileName = basename($filePath); - $originalFilename = $originalFilenameNodes->length ? $originalFilenameNodes->item(0)->textContent : $fileName; + $originalFilename = html_entity_decode($originalFilenameNodes->length ? $originalFilenameNodes->item(0)->textContent : $fileName); $binaryFile = $this->ioService->loadBinaryFile('collected' . \DIRECTORY_SEPARATOR . $fileName); diff --git a/bundle/FieldHandler/EnhancedBinaryFileHandler.php b/bundle/FieldHandler/EnhancedBinaryFileHandler.php index 3175ca2..6189e27 100644 --- a/bundle/FieldHandler/EnhancedBinaryFileHandler.php +++ b/bundle/FieldHandler/EnhancedBinaryFileHandler.php @@ -80,7 +80,9 @@ protected function store(EnhancedBinaryFileValue $value, FieldDefinition $fieldD ]; foreach ($fileInfo as $key => $binaryFileItem) { - $binaryFileElement = $doc->createElement($key, $binaryFileItem); + $cdataElement = $doc->createCDATASection($binaryFileItem); + $binaryFileElement = $doc->createElement($key); + $binaryFileElement->appendChild($cdataElement); $binaryFileList->appendChild($binaryFileElement); }