aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/3rdparty/libraries/readability/Readability.php
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2015-01-03 13:03:26 +0100
committerThomas Citharel <tcit@tcit.fr>2015-01-03 13:03:26 +0100
commit8ae45e7fe27ab416cf2a30cd2c319940037b7cbf (patch)
tree6033b672282d5c07398e145a29e564c7c30fb1ed /inc/3rdparty/libraries/readability/Readability.php
parent166ff0a0932ede6824a30d553c39ff6dd7dbb0b4 (diff)
downloadwallabag-8ae45e7fe27ab416cf2a30cd2c319940037b7cbf.tar.gz
wallabag-8ae45e7fe27ab416cf2a30cd2c319940037b7cbf.tar.zst
wallabag-8ae45e7fe27ab416cf2a30cd2c319940037b7cbf.zip
fixes #963 and use our own readability.php file for mobiClass
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?>