diff --git a/src/Component.php b/src/Component.php index 03ff9eb..0ea82b1 100644 --- a/src/Component.php +++ b/src/Component.php @@ -319,11 +319,7 @@ private function handleRawHtml( DOMNode $node, array $data ) { $variableName = $node->getAttribute( 'v-html' ); $node->removeAttribute( 'v-html' ); - $newNode = $node->cloneNode( true ); - - $this->appendHTML( $newNode, $data[$variableName] ); - - $node->parentNode->replaceChild( $newNode, $node ); + $this->appendHTML( $node, $data[$variableName] ); } } diff --git a/tests/php/TemplatingTest.php b/tests/php/TemplatingTest.php index cdd49e2..6657042 100644 --- a/tests/php/TemplatingTest.php +++ b/tests/php/TemplatingTest.php @@ -102,6 +102,15 @@ public function testTemplateWithVhtmlVariable_ReplacesVariableWithGivenValue() { $this->assertSame( '
some value
HTML
' ] + ); + + $this->assertSame( 'HTML