]> git.wh0rd.org Git - tt-rss.git/commitdiff
af_redditimgur: handle i.reddituploads.com as pictures
authorAndrew Dolgov <noreply@fakecake.org>
Thu, 7 Jul 2016 06:04:38 +0000 (09:04 +0300)
committerAndrew Dolgov <noreply@fakecake.org>
Thu, 7 Jul 2016 06:04:38 +0000 (09:04 +0300)
plugins/af_redditimgur/init.php

index 8243b94c43db1b70bdd9b78727b9a33ddc248268..f3257845032003fc1a8741c99af4550e04f6551b 100755 (executable)
@@ -179,7 +179,9 @@ class Af_RedditImgur extends Plugin {
                                        $found = true;
                                }
 
-                               if (preg_match("/\.(jpg|jpeg|gif|png)(\?[0-9][0-9]*)?$/i", $entry->getAttribute("href"))) {
+                               if (preg_match("/\.(jpg|jpeg|gif|png)(\?[0-9][0-9]*)?$/i", $entry->getAttribute("href")) ||
+                                       mb_strpos($entry->getAttribute("href"), "i.reddituploads.com") !== FALSE) {
+
                                        _debug("Handling as a picture", $debug);
 
                                        $img = $doc->createElement('img');