]> git.wh0rd.org Git - tt-rss.git/commitdiff
af_redditimgur: do not embed content of reddit links
authorAndrew Dolgov <noreply@fakecake.org>
Mon, 6 Jul 2015 20:59:10 +0000 (23:59 +0300)
committerAndrew Dolgov <noreply@fakecake.org>
Mon, 6 Jul 2015 20:59:10 +0000 (23:59 +0300)
plugins/af_redditimgur/init.php

index fe6d324008223a7b2e8cfe46ce20ea5bea4719f3..d42f4c6015e7b608952f85bee511b23ceb98be6a 100644 (file)
@@ -259,7 +259,8 @@ class Af_RedditImgur extends Plugin {
 
                                                $content_link = $xpath->query("(//a[contains(., '[link]')])")->item(0);
 
-                                               if ($content_link) {
+                                               if ($content_link && strpos($content_link->getAttribute("href"), "reddit.com") === FALSE) {
+
                                                        $tmp = fetch_file_contents($content_link->getAttribute("href"));
 
                                                        if ($tmp) {