Skip to content

Commit

Permalink
pkp/pkp-lib#9959 use createTextNode for article title in order to esc…
Browse files Browse the repository at this point in the history
…apt it (e.g. &) properly
  • Loading branch information
bozana committed May 13, 2024
1 parent c19d840 commit 3c57d18
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions filter/ArticleCrossrefXmlFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ public function createJournalArticleNode($doc, $submission)
$languageCounter = 1;
foreach ($titleLanguages as $lang) {
$titlesNode = $doc->createElementNS($deployment->getNamespace(), 'titles');
$titlesNode->appendChild($node = $doc->createElementNS($deployment->getNamespace(), 'title', $publication->getLocalizedTitle($lang, 'html')));
$titlesNode->appendChild($node = $doc->createElementNS($deployment->getNamespace(), 'title'));
$node->appendChild($doc->createTextNode($publication->getLocalizedTitle($lang, 'html')));
if ($subtitle = $publication->getLocalizedSubTitle($lang, 'html')) {
$titlesNode->appendChild($node = $doc->createElementNS($deployment->getNamespace(), 'subtitle', $subtitle));
}
Expand All @@ -134,8 +135,7 @@ public function createJournalArticleNode($doc, $submission)

// contributors
$authors = $publication->getData('authors');

if (!empty($authors)) {
if ($authors->count() != 0) {
$contributorsNode = $doc->createElementNS($deployment->getNamespace(), 'contributors');

$isFirst = true;
Expand Down

0 comments on commit 3c57d18

Please sign in to comment.