From: Andrew Dolgov Date: Thu, 7 Jul 2016 06:04:38 +0000 (+0300) Subject: af_redditimgur: handle i.reddituploads.com as pictures X-Git-Tag: 16.8~20 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=eb95d1bddf12c6bd11d2d3af5a524e1216ea2264;p=tt-rss.git af_redditimgur: handle i.reddituploads.com as pictures --- diff --git a/plugins/af_redditimgur/init.php b/plugins/af_redditimgur/init.php index 8243b94c..f3257845 100755 --- a/plugins/af_redditimgur/init.php +++ b/plugins/af_redditimgur/init.php @@ -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');