From 71726e16f7f8f9f4e0ae8836f654bc7f06d49d32 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Wed, 7 Apr 2021 17:54:18 -0400 Subject: [PATCH] Do not use appendChild for attributes --- lib/DOM/Element.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/DOM/Element.php b/lib/DOM/Element.php index 14f45da..2ddc432 100644 --- a/lib/DOM/Element.php +++ b/lib/DOM/Element.php @@ -118,7 +118,7 @@ class Element extends \DOMElement { $this->ownerDocument->removeChild($this); } $a->value = $this->escapeString($value, true); - $this->appendChild($a); + $this->setAttributeNodeNS($a); } else { try { parent::setAttributeNS($namespaceURI, $qualifiedName, $value);