I'm trying to impement the "userland workaround" described here:
https://bugs.php.net/bug.php?id=54429
with the following PHP code variation:
see: http://4nf.org/php/JSLikeHTMLElement.txtCode:public function __xCDATA($i) { $list = $i->getElementsByTagName('script'); foreach ($list as $script) { if ($script->childNodes->length && $script->firstChild->nodeType == 4) { $text = $this->ownerDocument->createTextNode( $script->firstChild->nodeValue); //$script->replaceChild($text, $script->firstChild); } } }
If I enable the last line:
...the function crashesCode://$script->replaceChild($text, $script->firstChild);
What am I doing wrong?
Thanks in advance and kind regards


Reply With Quote
Bookmarks