diff --git a/classes/ArticleFront.php b/classes/ArticleFront.php index 9adf669..bf0aded 100644 --- a/classes/ArticleFront.php +++ b/classes/ArticleFront.php @@ -393,6 +393,20 @@ public function createArticleContribGroup(Submission $submission, Publication $p ->setAttribute( 'rid', $affiliationToken)->parentNode ->appendChild($this->createTextNode($s)); } + + foreach ($author->getData('biography') as $locale => $bio) { + $bioElement = $this->createElement('bio'); + $bioElement->setAttribute('xml:lang', substr($locale, 0, 2)); + + $strippedBio = PKPString::stripUnsafeHtml($bio); + $bioDocument = new \DOMDocument(); + $bioDocument->createDocumentFragment(); + $bioDocument->loadHTML($strippedBio); + foreach ($bioDocument->getElementsByTagName('body')->item(0)->childNodes->getIterator() as $bioChildNode) { + $bioElement->appendChild($this->importNode($bioChildNode, true)); + } + $contribElement->appendChild($bioElement); + } } return ['contribGroupElement' => $contribGroupElement, 'affiliations' => $affiliations]; }