]> git.wh0rd.org - tt-rss.git/commitdiff
when choosing enclosures to embed or rewrite (af_zz_imgproxy) only use content type...
authorAndrew Dolgov <noreply@madoka.volgo-balt.ru>
Thu, 23 Mar 2017 12:22:00 +0000 (15:22 +0300)
committerAndrew Dolgov <noreply@madoka.volgo-balt.ru>
Thu, 23 Mar 2017 12:22:00 +0000 (15:22 +0300)
include/functions2.php
plugins/af_zz_imgproxy/init.php

index e00a0ba13305f15b0435cb1eed96c9b35a7f2e1b..28e182f8d9b1783a9c7742484db1657ad61b8a53 100644 (file)
                                                        $rv .= $retval;
                                                } else {
 
-                                                       if (preg_match("/image/", $entry["type"]) ||
-                                                                       preg_match("/\.(jpe?g|png|gif|bmp)/i", $entry["filename"])) {
+                                                       if (preg_match("/image/", $entry["type"])) {
 
                                                                        if (!$hide_images) {
                                                                                $encsize = '';
index e0ec2f1745c8919d38dc6aefc130f2afd250cc2d..a07ff5614b8d67c1ca42eb6cbf8a384df194616c 100644 (file)
@@ -23,7 +23,7 @@ class Af_Zz_ImgProxy extends Plugin {
        }
 
        function hook_enclosure_entry($enc) {
-               if (preg_match("/image/", $enc["content_type"]) || preg_match("/\.(jpe?g|png|gif|bmp)$/i", $enc["filename"])) {
+               if (preg_match("/image/", $enc["content_type"])) {
                        $proxy_all = $this->host->get($this, "proxy_all");
 
                        $enc["content_url"] = $this->rewrite_url_if_needed($enc["content_url"], $proxy_all);