From 3a3c74dfa42abd2fcd66b40f55675f5942ea0794 Mon Sep 17 00:00:00 2001 From: koffieanon Date: Sat, 4 Jan 2020 17:22:58 +0100 Subject: [PATCH] Also match images with query string (size, tokens, etc). --- plugins/af_redditimgur/init.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/af_redditimgur/init.php b/plugins/af_redditimgur/init.php index 6db194106..d28e072f4 100755 --- a/plugins/af_redditimgur/init.php +++ b/plugins/af_redditimgur/init.php @@ -264,7 +264,7 @@ class Af_RedditImgur extends Plugin { $found = true; } - if (!$found && (preg_match("/\.(jpg|jpeg|gif|png)(\?[0-9][0-9]*)?$/i", $entry->getAttribute("href")) || + if (!$found && (preg_match("/\.(jpg|jpeg|gif|png)(\?[0-9][0-9]*)?[$\?]/i", $entry->getAttribute("href")) || mb_strpos($entry->getAttribute("href"), "i.reddituploads.com") !== FALSE || mb_strpos($this->get_content_type($entry->getAttribute("href")), "image/") !== FALSE)) {