diff --git a/lib/SAML2/Assertion.php b/lib/SAML2/Assertion.php index 0fc0dbc91413354641eb94bb3b6c5ce69d296391..4cc24573cf37cb5acf13d565c517ea5b60fd654d 100644 --- a/lib/SAML2/Assertion.php +++ b/lib/SAML2/Assertion.php @@ -1065,7 +1065,15 @@ class SAML2_Assertion implements SAML2_SignedElement { if ($type !== NULL) { $attributeValue->setAttributeNS(SAML2_Const::NS_XSI, 'xsi:type', $type); } - $attributeValue->appendChild($document->createTextNode($value)); + + if ($value instanceof DOMNodeList) { + for ($i = 0; $i < $value->length; $i++) { + $node = $document->importNode($value->item($i), TRUE); + $attributeValue->appendChild($node); + } + } else { + $attributeValue->appendChild($document->createTextNode($value)); + } } } }