From 47888b3d87bc2399cb9fc23c595630e7bba801df Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 9 Jul 2015 09:39:45 +0300 Subject: af_redditimgur: do not reinline content extracted by readability --- plugins/af_redditimgur/init.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'plugins/af_redditimgur/init.php') diff --git a/plugins/af_redditimgur/init.php b/plugins/af_redditimgur/init.php index 9d8b276c4..a9f7f1760 100644 --- a/plugins/af_redditimgur/init.php +++ b/plugins/af_redditimgur/init.php @@ -272,7 +272,6 @@ class Af_RedditImgur extends Plugin { $r = new Readability($tmp, $content_link->getAttribute("href")); if ($r->init()) { - //$article["content"] = $r->articleContent->innerHTML . "
" . $article["content"]; $tmpxpath = new DOMXPath($r->dom); @@ -295,11 +294,13 @@ class Af_RedditImgur extends Plugin { $article["content"] = $r->articleContent->innerHTML . "
" . $article["content"]; - $doc = new DOMDocument(); - @$doc->loadHTML($article["content"]); - $xpath = new DOMXPath($doc); + // prob not a very good idea (breaks wikipedia pages, etc) - + // inliner currently is not really fit for any random web content - $found = $this->inline_stuff($article, $doc, $xpath); + //$doc = new DOMDocument(); + //@$doc->loadHTML($article["content"]); + //$xpath = new DOMXPath($doc); + //$found = $this->inline_stuff($article, $doc, $xpath); } } } -- cgit v1.2.3