diff options
author | Andrew Dolgov <[email protected]> | 2020-09-22 09:04:33 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2020-09-22 09:04:33 +0300 |
commit | 74568df4ff7b7788991636f6fb2ed62012f85c3b (patch) | |
tree | 673bcb01157b38e4b38f8f4c8227012e8a750e18 /plugins/af_readability | |
parent | d04ac399ff284e9747e3fb55e87d05e0a5b8d85f (diff) |
remove a lot of stuff from global context (functions.php), add a few helper classes instead
Diffstat (limited to 'plugins/af_readability')
-rwxr-xr-x | plugins/af_readability/init.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/af_readability/init.php b/plugins/af_readability/init.php index ce8f8d2a4..111462c4b 100755 --- a/plugins/af_readability/init.php +++ b/plugins/af_readability/init.php @@ -176,7 +176,7 @@ class Af_Readability extends Plugin { global $fetch_effective_url; - $tmp = fetch_file_contents([ + $tmp = UrlHelper::fetch([ "url" => $url, "http_accept" => "text/*", "type" => "text/html"]); @@ -235,7 +235,7 @@ class Af_Readability extends Plugin { $extracted_content = $this->extract_content($article["link"]); # let's see if there's anything of value in there - $content_test = trim(strip_tags(sanitize($extracted_content))); + $content_test = trim(strip_tags(Sanitizer::sanitize($extracted_content))); if ($content_test) { $article["content"] = $extracted_content; @@ -264,7 +264,7 @@ class Af_Readability extends Plugin { $extracted_content = $this->extract_content($link); # let's see if there's anything of value in there - $content_test = trim(strip_tags(sanitize($extracted_content))); + $content_test = trim(strip_tags(Sanitizer::sanitize($extracted_content))); if ($content_test) { return $extracted_content; @@ -303,7 +303,7 @@ class Af_Readability extends Plugin { $ret = []; if ($row = $sth->fetch()) { - $ret["content"] = sanitize($this->extract_content($row["link"])); + $ret["content"] = Sanitizer::sanitize($this->extract_content($row["link"])); } print json_encode($ret); |