From d4940681dd40a88e3f89b6ba423a3456b4abd38e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Velad=20Galv=C3=A1n?= Date: Mon, 6 May 2024 20:02:50 +0200 Subject: [PATCH] fix: Fix tXml conversion to DOMElement (#6538) Fixes https://github.com/shaka-project/shaka-player/issues/6524 --- lib/util/tXml.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/util/tXml.js b/lib/util/tXml.js index 9a9c59be3c..01d24bcbd5 100644 --- a/lib/util/tXml.js +++ b/lib/util/tXml.js @@ -779,7 +779,7 @@ shaka.util.TXml = class { element.setAttribute(k, v); } - if (doParents && node.parent) { + if (doParents && node.parent && node.parent.tagName != '?xml') { const parentElement = TXml.txmlNodeToDomElement( node.parent, /* doParents= */ true, /* doChildren= */ false); parentElement.appendChild(element);