aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/3rdparty/libraries/readability/Readability.php
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2015-02-01 11:33:41 +0100
committerThomas Citharel <tcit@tcit.fr>2015-02-01 11:33:41 +0100
commitc416cab8c9297d17f073c66d07bafab8b5068db2 (patch)
tree5f6342c866127675e3c59e1b664adc257262d86c /inc/3rdparty/libraries/readability/Readability.php
parente51487f93265521cf04d8752b0554bb1f05dd189 (diff)
parentbc6f5a8086b331bf21cdfcac799788264d8cd3b2 (diff)
downloadwallabag-c416cab8c9297d17f073c66d07bafab8b5068db2.tar.gz
wallabag-c416cab8c9297d17f073c66d07bafab8b5068db2.tar.zst
wallabag-c416cab8c9297d17f073c66d07bafab8b5068db2.zip
Merge branch 'dev' into randomarticle
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?>