]> git.wh0rd.org Git - tt-rss.git/commitdiff
af_redditimgur: better handling of image urls with multiple-character numeric suffixes
authorAndrew Dolgov <noreply@fakecake.org>
Sun, 5 Jul 2015 14:47:53 +0000 (17:47 +0300)
committerAndrew Dolgov <noreply@fakecake.org>
Sun, 5 Jul 2015 14:47:53 +0000 (17:47 +0300)
plugins/af_redditimgur/init.php

index 6b448764224ed569589558587ca1614bd4ba09c9..809792dd8ba219b896374bcf193520f66f523a5a 100644 (file)
@@ -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');