diff options
author | Andres Rey <[email protected]> | 2016-11-14 16:45:12 +0000 |
---|---|---|
committer | Andres Rey <[email protected]> | 2016-11-14 16:45:12 +0000 |
commit | 1c176922209b8a3002434a670b64a6f3683f812f (patch) | |
tree | de472bdf516c8ebae33c9f07e86e7c8128e659d5 /src/Readability.php | |
parent | 4ff745766c127ecfa013c8344fd1c1e2f4a2dc5d (diff) |
Replacing old node when setting a new node tag
Diffstat (limited to 'src/Readability.php')
-rw-r--r-- | src/Readability.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Readability.php b/src/Readability.php index 0ad22e4..7fc0d2b 100644 --- a/src/Readability.php +++ b/src/Readability.php @@ -287,6 +287,8 @@ class Readability extends Element implements ReadabilityInterface // The import must be done on the firstChild of $new, since $new is a DOMDocument and not a DOMElement. $import = $this->node->ownerDocument->importNode($new->firstChild, true); $this->node->parentNode->replaceChild($import, $this->node); + + $this->node = $import; } /** |