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:
parent
166ff0a093
commit
8ae45e7fe2
5 changed files with 7 additions and 1183 deletions
|
@ -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
|
|||
}
|
||||
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue