From eb95d1bddf12c6bd11d2d3af5a524e1216ea2264 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 7 Jul 2016 09:04:38 +0300 Subject: [PATCH] af_redditimgur: handle i.reddituploads.com as pictures --- plugins/af_redditimgur/init.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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'); -- 2.39.5