Skip to content

Commit

Permalink
Merge branch 'main' into preprod
Browse files Browse the repository at this point in the history
  • Loading branch information
devletech committed Dec 19, 2024
2 parents 11ac03e + b6e5441 commit ba7409b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions library/Episciences/Paper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ba7409b

Please sign in to comment.