aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/3rdparty/libraries/readability/Readability.php
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2015-02-18 19:17:31 +0100
committerThomas Citharel <tcit@tcit.fr>2015-02-18 19:17:31 +0100
commit4b1fa4c2febc7abbc6da3d65e4e760949a55843c (patch)
treea93ec906dbb03ec70e9cdc5dc876392c6d758e97 /inc/3rdparty/libraries/readability/Readability.php
parent364953ede585b75fb29dc94b1c5f853053eaed0b (diff)
parentdf89c6f71adebfdb754ec3eb2fd775d8efbdb280 (diff)
downloadwallabag-1.9.tar.gz
wallabag-1.9.tar.zst
wallabag-1.9.zip
Merge pull request #1081 from wallabag/dev1.9
Version 1.9.0
Diffstat (limited to 'inc/3rdparty/libraries/readability/Readability.php')
-rwxr-xr-xinc/3rdparty/libraries/readability/Readability.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/inc/3rdparty/libraries/readability/Readability.php b/inc/3rdparty/libraries/readability/Readability.php
index 4fa3ba63..a30012ce 100755
--- a/inc/3rdparty/libraries/readability/Readability.php
+++ b/inc/3rdparty/libraries/readability/Readability.php
@@ -46,6 +46,7 @@
46 46
47// This class allows us to do JavaScript like assignements to innerHTML 47// This class allows us to do JavaScript like assignements to innerHTML
48require_once(dirname(__FILE__).'/JSLikeHTMLElement.php'); 48require_once(dirname(__FILE__).'/JSLikeHTMLElement.php');
49libxml_use_internal_errors(true);
49 50
50// Alternative usage (for testing only!) 51// Alternative usage (for testing only!)
51// uncomment the lines below and call Readability.php in your browser 52// uncomment the lines below and call Readability.php in your browser
@@ -697,7 +698,7 @@ class Readability
697 $articleContent = $this->dom->createElement('div'); 698 $articleContent = $this->dom->createElement('div');
698 $articleContent->setAttribute('id', 'readability-content'); 699 $articleContent->setAttribute('id', 'readability-content');
699 $siblingScoreThreshold = max(10, ((int)$topCandidate->getAttribute('readability')) * 0.2); 700 $siblingScoreThreshold = max(10, ((int)$topCandidate->getAttribute('readability')) * 0.2);
700 $siblingNodes = $topCandidate->parentNode->childNodes; 701 $siblingNodes = @$topCandidate->parentNode->childNodes;
701 if (!isset($siblingNodes)) { 702 if (!isset($siblingNodes)) {
702 $siblingNodes = new stdClass; 703 $siblingNodes = new stdClass;
703 $siblingNodes->length = 0; 704 $siblingNodes->length = 0;
@@ -1148,4 +1149,4 @@ class Readability
1148 } 1149 }
1149 1150
1150} 1151}
1151?> \ No newline at end of file 1152?>