af_redditimgur: better handling of image urls with multiple-character numeric suffixes

master
Andrew Dolgov 10 years ago
parent 611e5ba37d
commit 5f58daa2fb

@ -84,8 +84,7 @@ class Af_RedditImgur extends Plugin {
$found = true;
}
if (preg_match("/\.(jpg|jpeg|gif|png)(\?[0-9])?$/i", $entry->getAttribute("href"))) {
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"));

Loading…
Cancel
Save