diff --git a/CitationStyleLanguagePlugin.php b/CitationStyleLanguagePlugin.php
index 618efc2..5caa671 100644
--- a/CitationStyleLanguagePlugin.php
+++ b/CitationStyleLanguagePlugin.php
@@ -581,7 +581,15 @@ public function getCitation(PKPRequest $request, Submission $submission, string
$additionalMarkup = [
'DOI' => [
'function' => function ($item, $renderedValue) {
- return '' . $renderedValue . '';
+ $doiWithUrl = 'https://doi.org/'.$item->DOI;
+ if (str_contains($renderedValue, $doiWithUrl)) {
+ $doiLink = '' . $doiWithUrl . '';
+ return str_replace($doiWithUrl, $doiLink, $renderedValue);
+ } else {
+ $doiLink = '' . $item->DOI . '';
+ return str_replace($item->DOI, $doiLink, $renderedValue);
+
+ }
},
'affixes' => true
],
@@ -589,7 +597,7 @@ public function getCitation(PKPRequest $request, Submission $submission, string
'function' => function ($item, $renderedValue) {
return '' . $renderedValue . '';
},
- 'affixes' => true
+ 'affixes' => false
],
];