diff options
author | Andres Rey <[email protected]> | 2016-11-21 16:19:38 +0000 |
---|---|---|
committer | Andres Rey <[email protected]> | 2016-11-21 16:19:38 +0000 |
commit | 6d979653a8c26107acda0cac376c693bb5a1a07a (patch) | |
tree | 4d31ae6090d5c97773faa4263b6bca95ac877268 /src | |
parent | 8bb837903ba8305c75fb1681ee8c9c4cb7449c5d (diff) |
Switched to a more html-friendly readability tag.
Diffstat (limited to 'src')
-rw-r--r-- | src/Readability.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Readability.php b/src/Readability.php index d2dc9f5..8767752 100644 --- a/src/Readability.php +++ b/src/Readability.php @@ -54,7 +54,7 @@ class Readability extends Element implements ReadabilityInterface $score = 0; if (!in_array(get_class($node), ['DOMDocument', 'DOMComment'])) { - $hasScore = $node->getAttribute('readability'); + $hasScore = $node->getAttribute('data-readability'); if ($hasScore !== '') { // Node was initialized previously. Restoring score and setting flag. $this->initialized = true; @@ -259,7 +259,7 @@ class Readability extends Element implements ReadabilityInterface $this->contentScore = (float)$score; // Set score in an attribute of the tag to prevent losing it while creating new Readability objects. - $this->node->setAttribute('readability', $this->contentScore); + $this->node->setAttribute('data-readability', $this->contentScore); return $this->contentScore; } |