From 7adf95562d924445acfe575f15978e5258efd95f Mon Sep 17 00:00:00 2001 From: aliz27 Date: Thu, 14 May 2015 11:27:09 +0200 Subject: [PATCH] Sometimes imgur links has ?1 in the url --- 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 d885ff16..889e2bcd 100644 --- a/plugins/af_redditimgur/init.php +++ b/plugins/af_redditimgur/init.php @@ -78,7 +78,7 @@ class Af_RedditImgur extends Plugin { } } - if (preg_match("/\.(jpg|jpeg|gif|png)$/i", $entry->getAttribute("href"))) { + if (preg_match("/\.(jpg|jpeg|gif|png)(\?[0-9])?$/i", $entry->getAttribute("href"))) { $img = $doc->createElement('img'); $img->setAttribute("src", $entry->getAttribute("href")); -- 2.39.5