summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndres Rey <[email protected]>2018-11-18 20:41:12 +0000
committerAndres Rey <[email protected]>2018-11-18 20:41:12 +0000
commitfaa412165e7d44b48f6e344af00adaa29bbc3fdb (patch)
treec038f9081679b2a11e2fdebc044fdb59ef85e360
parentffccb240b1bb81136c45360a14adcbfd8d35e3b7 (diff)
Import node attributes by default when setting a new tag
-rw-r--r--src/Nodes/NodeUtility.php2
-rw-r--r--src/Readability.php2
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');
}
}