From a5517fe857535163d5989778108fd9d7eb891707 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 21 Dec 2018 17:50:16 +0300 Subject: fetch_file_contents: decompress gzipped data af_readability: remove utf8 preamble hack --- plugins/af_readability/init.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins/af_readability') diff --git a/plugins/af_readability/init.php b/plugins/af_readability/init.php index 339cc20d2..273f3d46b 100755 --- a/plugins/af_readability/init.php +++ b/plugins/af_readability/init.php @@ -148,6 +148,7 @@ class Af_Readability extends Plugin { } public function extract_content($url) { + global $fetch_effective_url; $tmp = fetch_file_contents([ @@ -158,7 +159,7 @@ class Af_Readability extends Plugin { if ($tmp && mb_strlen($tmp) < 1024 * 500) { $tmpdoc = new DOMDocument("1.0", "UTF-8"); - if (!$tmpdoc->loadHTML('\n' . $tmp)) + if (!$tmpdoc->loadHTML($tmp)) return false; if (strtolower($tmpdoc->encoding) != 'utf-8') { -- cgit v1.2.3