From dd8c289b8fd3733924f94c061f32f310f09fea15 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 26 Nov 2012 14:38:33 +0400 Subject: [PATCH] update example reddit filter --- classes/filter/redditimgur.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/filter/redditimgur.php b/classes/filter/redditimgur.php index 6b41015e..b9ed2435 100644 --- a/classes/filter/redditimgur.php +++ b/classes/filter/redditimgur.php @@ -15,7 +15,7 @@ class Filter_RedditImgur { foreach ($entries as $entry) { if ($entry->hasAttribute("href")) { - if (preg_match("/i.imgur.com\/.*?.jpg/", $entry->getAttribute("href"))) { + if (preg_match("/\.(jpg|jpeg|gif|png)$/i", $entry->getAttribute("href"))) { $img = $doc->createElement('img'); $img->setAttribute("src", $entry->getAttribute("href")); -- 2.39.5