]> git.wh0rd.org - tt-rss.git/commitdiff
af_redditimgur: do not reinline content extracted by readability
authorAndrew Dolgov <noreply@fakecake.org>
Thu, 9 Jul 2015 06:39:45 +0000 (09:39 +0300)
committerAndrew Dolgov <noreply@fakecake.org>
Thu, 9 Jul 2015 06:39:45 +0000 (09:39 +0300)
plugins/af_redditimgur/init.php

index 9d8b276c47a3f55a7f03e88a9409a80d7513de7b..a9f7f1760d0730bbb3a9d0e88b3f0c1876fcbb6d 100644 (file)
@@ -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 . "<hr/>" . $article["content"];
 
                                                                $tmpxpath = new DOMXPath($r->dom);
 
@@ -295,11 +294,13 @@ class Af_RedditImgur extends Plugin {
 
                                                                $article["content"] = $r->articleContent->innerHTML . "<hr/>" . $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);
                                                        }
                                                }
                                        }