diff options
author | Andrew Dolgov <[email protected]> | 2018-12-21 17:50:16 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2018-12-21 17:50:16 +0300 |
commit | a5517fe857535163d5989778108fd9d7eb891707 (patch) | |
tree | 4a0a3ddd4b77a9b2b109a8c54d7f744f012eebb3 /plugins/af_readability | |
parent | 782eda45db6861a09fc42bad396c3cb28505b28f (diff) |
fetch_file_contents: decompress gzipped data
af_readability: remove utf8 preamble hack
Diffstat (limited to 'plugins/af_readability')
-rwxr-xr-x | plugins/af_readability/init.php | 3 |
1 files changed, 2 insertions, 1 deletions
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('<?xml encoding="utf-8" ?>\n' . $tmp)) + if (!$tmpdoc->loadHTML($tmp)) return false; if (strtolower($tmpdoc->encoding) != 'utf-8') { |