diff options
author | Thomas Citharel <tcit@tcit.fr> | 2015-02-01 11:27:10 +0100 |
---|---|---|
committer | Thomas Citharel <tcit@tcit.fr> | 2015-02-01 11:27:10 +0100 |
commit | b05f482dd219acd5f5c7e9669ad8bd168ba224c6 (patch) | |
tree | 4c89e1dc27201b34e35a8d9e3e8e461531978443 /inc/3rdparty/libraries/readability/Readability.php | |
parent | 3dcd85c075998ecdf2d54c5661c42e24080067d5 (diff) | |
parent | bc6f5a8086b331bf21cdfcac799788264d8cd3b2 (diff) | |
download | wallabag-b05f482dd219acd5f5c7e9669ad8bd168ba224c6.tar.gz wallabag-b05f482dd219acd5f5c7e9669ad8bd168ba224c6.tar.zst wallabag-b05f482dd219acd5f5c7e9669ad8bd168ba224c6.zip |
Merge branch 'dev' into reloadarticle
Diffstat (limited to 'inc/3rdparty/libraries/readability/Readability.php')
-rwxr-xr-x | inc/3rdparty/libraries/readability/Readability.php | 5 |
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 |
48 | require_once(dirname(__FILE__).'/JSLikeHTMLElement.php'); | 48 | require_once(dirname(__FILE__).'/JSLikeHTMLElement.php'); |
49 | libxml_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 | ?> |