From: Andrew Dolgov Date: Sun, 5 Jul 2015 14:47:53 +0000 (+0300) Subject: af_redditimgur: better handling of image urls with multiple-character numeric suffixes X-Git-Tag: 16.3~259 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=5f58daa2fbc4be8623b18030e76617e6b0046b02;p=tt-rss.git af_redditimgur: better handling of image urls with multiple-character numeric suffixes --- diff --git a/plugins/af_redditimgur/init.php b/plugins/af_redditimgur/init.php index 6b448764..809792dd 100644 --- a/plugins/af_redditimgur/init.php +++ b/plugins/af_redditimgur/init.php @@ -84,9 +84,8 @@ class Af_RedditImgur extends Plugin { $found = true; } - if (preg_match("/\.(jpg|jpeg|gif|png)(\?[0-9])?$/i", $entry->getAttribute("href"))) { - - $img = $doc->createElement('img'); + if (preg_match("/\.(jpg|jpeg|gif|png)(\?[0-9][0-9]*)?$/i", $entry->getAttribute("href"))) { + $img = $doc->createElement('img'); $img->setAttribute("src", $entry->getAttribute("href")); $br = $doc->createElement('br');