1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-09-15 18:57:05 +00:00

fixes #963 and use our own readability.php file for mobiClass

This commit is contained in:
Thomas Citharel 2015-01-03 13:03:26 +01:00
parent 166ff0a093
commit 8ae45e7fe2
5 changed files with 7 additions and 1183 deletions

View file

@ -46,6 +46,7 @@
// This class allows us to do JavaScript like assignements to innerHTML
require_once(dirname(__FILE__).'/JSLikeHTMLElement.php');
libxml_use_internal_errors(true);
// Alternative usage (for testing only!)
// uncomment the lines below and call Readability.php in your browser
@ -697,7 +698,7 @@ class Readability
$articleContent = $this->dom->createElement('div');
$articleContent->setAttribute('id', 'readability-content');
$siblingScoreThreshold = max(10, ((int)$topCandidate->getAttribute('readability')) * 0.2);
$siblingNodes = $topCandidate->parentNode->childNodes;
$siblingNodes = @$topCandidate->parentNode->childNodes;
if (!isset($siblingNodes)) {
$siblingNodes = new stdClass;
$siblingNodes->length = 0;
@ -1148,4 +1149,4 @@ class Readability
}
}
?>
?>