diff options
author | Andres Rey <[email protected]> | 2018-11-18 20:41:12 +0000 |
---|---|---|
committer | Andres Rey <[email protected]> | 2018-11-18 20:41:12 +0000 |
commit | faa412165e7d44b48f6e344af00adaa29bbc3fdb (patch) | |
tree | c038f9081679b2a11e2fdebc044fdb59ef85e360 | |
parent | ffccb240b1bb81136c45360a14adcbfd8d35e3b7 (diff) |
Import node attributes by default when setting a new tag
-rw-r--r-- | src/Nodes/NodeUtility.php | 2 | ||||
-rw-r--r-- | src/Readability.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/Nodes/NodeUtility.php b/src/Nodes/NodeUtility.php index a3d8509..4f12a4b 100644 --- a/src/Nodes/NodeUtility.php +++ b/src/Nodes/NodeUtility.php @@ -62,7 +62,7 @@ class NodeUtility * * @return DOMNode */ - public static function setNodeTag($node, $value, $importAttributes = false) + public static function setNodeTag($node, $value, $importAttributes = true) { $new = new DOMDocument('1.0', 'utf-8'); $new->appendChild($new->createElement($value)); diff --git a/src/Readability.php b/src/Readability.php index a2e57c9..a1f829e 100644 --- a/src/Readability.php +++ b/src/Readability.php @@ -911,7 +911,7 @@ class Readability for ($i = 0; $i < $length; $i++) { $this->logger->debug('[PrepDocument] Converting font tag into a span tag.'); $font = $fonts->item($length - 1 - $i); - NodeUtility::setNodeTag($font, 'span', true); + NodeUtility::setNodeTag($font, 'span'); } } |