From b6e5441320901634613f71317c24811e5fa63b0d Mon Sep 17 00:00:00 2001 From: Djamel Chibane <20502173+devletech@users.noreply.github.com> Date: Thu, 19 Dec 2024 09:48:43 +0100 Subject: [PATCH] related to commit c662f3bc76679f0bb9b76a59064739e46b6a2ed1 --- library/Episciences/Paper.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/library/Episciences/Paper.php b/library/Episciences/Paper.php index 437d529f..8d8dccda 100644 --- a/library/Episciences/Paper.php +++ b/library/Episciences/Paper.php @@ -1459,8 +1459,7 @@ public function toJson(): ?string // Update document keys $document = $xmlToArray[$keyBody]; $result = $serializer->serialize($document, 'json'); - - return str_replace(array('#', '%%ID', '%%VERSION'), array('value', str_replace('"', '\"',$this->getIdentifier()), $this->getVersion()), $result); + return str_replace(array('#', '%%ID', '%%VERSION'), array('value', Episciences_Tools::isJson($this->getIdentifier()) ? str_replace('"', '\"', $this->getIdentifier()) : $this->getIdentifier(), $this->getVersion()), $result); } private function processTmpVersion(Episciences_Paper $paper): void