Skip to content

Commit b6029ab

Browse files
committed
fixed html fragment construction
1 parent 4646575 commit b6029ab

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/Dataplater.php

+4-6
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,8 @@ private function execute($context = null): void
213213
continue;
214214
}
215215

216-
$fragment = $this->doc->createDocumentFragment()->appendXML(
217-
$this->eval($value, $elem)
218-
);
216+
$fragment = $this->doc->createDocumentFragment();
217+
$fragment->appendXML( $this->eval($value, $elem) );
219218
$elem->nodeValue = '';
220219
$elem->appendChild($fragment);
221220

@@ -274,9 +273,8 @@ private function execute($context = null): void
274273

275274
$selector = "data-var-html";
276275
foreach ($this->xpath->query("descendant-or-self::*[@$selector]", $context) as $elem) {
277-
$fragment = $this->doc->createDocumentFragment()->appendXML(
278-
$this->eval($elem->getAttribute($selector), $elem)
279-
);
276+
$fragment = $this->doc->createDocumentFragment();
277+
$fragment->appendXML( $this->eval($elem->getAttribute($selector), $elem) );
280278
$elem->nodeValue = '';
281279
$elem->appendChild($fragment);
282280

0 commit comments

Comments
 (0)