I'm writing a plugin for my CMS where I used PHP DOM to update the DOM. I want to replace part of the DOM with some HTML. When I perform:
It converts the html entities and displays all the code. From my research the nodeValue considers the cotnents to be CDATA and I figure this is causing my issue.
Is there a way to replace the HTML of a DOMElement with PHP?
Code:
$domelement->nodeValue = $html;
Is there a way to replace the HTML of a DOMElement with PHP?
Comment