Browse Source

Correction of the feed mechanism (Simplepie)

Cebabonet 7 years ago
parent
commit
7d9d1e8960
1 changed files with 50 additions and 50 deletions
  1. 50 50
      classes/simplepie.class.php

+ 50 - 50
classes/simplepie.class.php View File

90
 
90
 
91
     public function feed_url($url)
91
     public function feed_url($url)
92
     {
92
     {
93
-        $this->rss_url = SimplePie_Misc::fix_protocol($url, 1);
93
+        $this->rss_url = (new SimplePie_Misc)->fix_protocol($url, 1);
94
     }
94
     }
95
 
95
 
96
     public function set_file(&$file)
96
     public function set_file(&$file)
147
 
147
 
148
     public function set_cache_class($class = 'SimplePie_Cache')
148
     public function set_cache_class($class = 'SimplePie_Cache')
149
     {
149
     {
150
-        if (SimplePie_Misc::is_a_class($class, 'SimplePie_Cache')) {
150
+        if ((new SimplePie_Misc)->is_a_class($class, 'SimplePie_Cache')) {
151
             $this->cache_class = $class;
151
             $this->cache_class = $class;
152
             return true;
152
             return true;
153
         }
153
         }
156
 
156
 
157
     public function set_locator_class($class = 'SimplePie_Locator')
157
     public function set_locator_class($class = 'SimplePie_Locator')
158
     {
158
     {
159
-        if (SimplePie_Misc::is_a_class($class, 'SimplePie_Locator')) {
159
+        if ((new SimplePie_Misc)->is_a_class($class, 'SimplePie_Locator')) {
160
             $this->locator_class = $class;
160
             $this->locator_class = $class;
161
             return true;
161
             return true;
162
         }
162
         }
165
 
165
 
166
     public function set_parser_class($class = 'SimplePie_Parser')
166
     public function set_parser_class($class = 'SimplePie_Parser')
167
     {
167
     {
168
-        if (SimplePie_Misc::is_a_class($class, 'SimplePie_Parser')) {
168
+        if ((new SimplePie_Misc)->is_a_class($class, 'SimplePie_Parser')) {
169
             $this->parser_class = $class;
169
             $this->parser_class = $class;
170
             return true;
170
             return true;
171
         }
171
         }
174
 
174
 
175
     public function set_file_class($class = 'SimplePie_File')
175
     public function set_file_class($class = 'SimplePie_File')
176
     {
176
     {
177
-        if (SimplePie_Misc::is_a_class($class, 'SimplePie_File')) {
177
+        if ((new SimplePie_Misc)->is_a_class($class, 'SimplePie_File')) {
178
             $this->file_class = $class;
178
             $this->file_class = $class;
179
             return true;
179
             return true;
180
         }
180
         }
298
             if (get_magic_quotes_gpc()) {
298
             if (get_magic_quotes_gpc()) {
299
                 $_GET[$this->sanitize->bypass_image_hotlink] = stripslashes($_GET[$this->sanitize->bypass_image_hotlink]);
299
                 $_GET[$this->sanitize->bypass_image_hotlink] = stripslashes($_GET[$this->sanitize->bypass_image_hotlink]);
300
             }
300
             }
301
-            SimplePie_Misc::display_file($_GET[$this->sanitize->bypass_image_hotlink], 10, $this->useragent);
301
+            (new SimplePie_Misc)->display_file($_GET[$this->sanitize->bypass_image_hotlink], 10, $this->useragent);
302
         }
302
         }
303
 
303
 
304
         if (isset($_GET['js'])) {
304
         if (isset($_GET['js'])) {
421
                     if ($feed) {
421
                     if ($feed) {
422
                         if ($cache && !$cache->save(array('url' => $this->rss_url, 'feed_url' => $feed))) {
422
                         if ($cache && !$cache->save(array('url' => $this->rss_url, 'feed_url' => $feed))) {
423
                             $this->error = "$cache->name is not writeable";
423
                             $this->error = "$cache->name is not writeable";
424
-                            SimplePie_Misc::error($this->error, E_USER_WARNING, __FILE__, __LINE__);
424
+                            (new SimplePie_Misc)->error($this->error, E_USER_WARNING, __FILE__, __LINE__);
425
                         }
425
                         }
426
                         $this->rss_url = $feed;
426
                         $this->rss_url = $feed;
427
                         return $this->init();
427
                         return $this->init();
428
                     } else {
428
                     } else {
429
                         $this->error = "A feed could not be found at $this->rss_url";
429
                         $this->error = "A feed could not be found at $this->rss_url";
430
-                        SimplePie_Misc::error($this->error, E_USER_WARNING, __FILE__, __LINE__);
430
+                        (new SimplePie_Misc)->error($this->error, E_USER_WARNING, __FILE__, __LINE__);
431
                         return false;
431
                         return false;
432
                     }
432
                     }
433
                 }
433
                 }
478
             }
478
             }
479
 
479
 
480
             // Change the encoding to UTF-8 (as we always use UTF-8 internally)
480
             // Change the encoding to UTF-8 (as we always use UTF-8 internally)
481
-            $data = SimplePie_Misc::change_encoding($data, $encoding, 'UTF-8');
481
+            $data = (new SimplePie_Misc)->change_encoding($data, $encoding, 'UTF-8');
482
 
482
 
483
             // Strip illegal characters (if on less  than PHP5, as on PHP5 expat can manage fine)
483
             // Strip illegal characters (if on less  than PHP5, as on PHP5 expat can manage fine)
484
             if (version_compare(phpversion(), '5', '<')) {
484
             if (version_compare(phpversion(), '5', '<')) {
487
                 } elseif (function_exists('mb_convert_encoding')) {
487
                 } elseif (function_exists('mb_convert_encoding')) {
488
                     $data = mb_convert_encoding($data, 'UTF-8', 'UTF-8');
488
                     $data = mb_convert_encoding($data, 'UTF-8', 'UTF-8');
489
                 } else {
489
                 } else {
490
-                    $data = SimplePie_Misc::utf8_bad_replace($data);
490
+                    $data = (new SimplePie_Misc)->utf8_bad_replace($data);
491
                 }
491
                 }
492
             }
492
             }
493
 
493
 
539
                 // Cache the file if caching is enabled
539
                 // Cache the file if caching is enabled
540
                 if ($cache && !$cache->save($this->data)) {
540
                 if ($cache && !$cache->save($this->data)) {
541
                     $this->error = "$cache->name is not writeable";
541
                     $this->error = "$cache->name is not writeable";
542
-                    SimplePie_Misc::error($this->error, E_USER_WARNING, __FILE__, __LINE__);
542
+                    (new SimplePie_Misc)->error($this->error, E_USER_WARNING, __FILE__, __LINE__);
543
                 }
543
                 }
544
                 return true;
544
                 return true;
545
             }
545
             }
546
             // If we have an error, just set SimplePie::error to it and quit
546
             // If we have an error, just set SimplePie::error to it and quit
547
             else {
547
             else {
548
                 $this->error = "XML error: $data->error_string at line $data->current_line, column $data->current_column";
548
                 $this->error = "XML error: $data->error_string at line $data->current_line, column $data->current_column";
549
-                SimplePie_Misc::error($this->error, E_USER_WARNING, __FILE__, __LINE__);
549
+                (new SimplePie_Misc)->error($this->error, E_USER_WARNING, __FILE__, __LINE__);
550
                 return false;
550
                 return false;
551
             }
551
             }
552
         }
552
         }
595
     public function get_favicon($check = false, $alternate = null)
595
     public function get_favicon($check = false, $alternate = null)
596
     {
596
     {
597
         if (!empty($this->data['info']['link']['alternate'][0])) {
597
         if (!empty($this->data['info']['link']['alternate'][0])) {
598
-            $favicon = SimplePie_Misc::absolutize_url('/favicon.ico', $this->get_feed_link());
598
+            $favicon = (new SimplePie_Misc)->absolutize_url('/favicon.ico', $this->get_feed_link());
599
 
599
 
600
             if ($check) {
600
             if ($check) {
601
                 $file = new $this->file_class($favicon, $this->timeout/10, 5, null, $this->useragent, $this->force_fsockopen);
601
                 $file = new $this->file_class($favicon, $this->timeout/10, 5, null, $this->useragent, $this->force_fsockopen);
628
     public function subscribe_feed()
628
     public function subscribe_feed()
629
     {
629
     {
630
         if (!empty($this->rss_url)) {
630
         if (!empty($this->rss_url)) {
631
-            return SimplePie_Misc::fix_protocol($this->rss_url, 2);
631
+            return (new SimplePie_Misc)->fix_protocol($this->rss_url, 2);
632
         } else {
632
         } else {
633
             return false;
633
             return false;
634
         }
634
         }
637
     public function subscribe_outlook()
637
     public function subscribe_outlook()
638
     {
638
     {
639
         if (!empty($this->rss_url)) {
639
         if (!empty($this->rss_url)) {
640
-            return 'outlook' . SimplePie_Misc::fix_protocol($this->rss_url, 2);
640
+            return 'outlook' . (new SimplePie_Misc)->fix_protocol($this->rss_url, 2);
641
         } else {
641
         } else {
642
             return false;
642
             return false;
643
         }
643
         }
646
     public function subscribe_podcast()
646
     public function subscribe_podcast()
647
     {
647
     {
648
         if (!empty($this->rss_url)) {
648
         if (!empty($this->rss_url)) {
649
-            return SimplePie_Misc::fix_protocol($this->rss_url, 3);
649
+            return (new SimplePie_Misc)->fix_protocol($this->rss_url, 3);
650
         } else {
650
         } else {
651
             return false;
651
             return false;
652
         }
652
         }
1745
             if (!is_array($headers)) {
1745
             if (!is_array($headers)) {
1746
                 $headers = array();
1746
                 $headers = array();
1747
             }
1747
             }
1748
-            if (extension_loaded('curl') && version_compare(SimplePie_Misc::get_curl_version(), '7.10.5', '>=') && !$force_fsockopen) {
1748
+            if (extension_loaded('curl') && version_compare((new SimplePie_Misc)->get_curl_version(), '7.10.5', '>=') && !$force_fsockopen) {
1749
                 $this->method = 'curl';
1749
                 $this->method = 'curl';
1750
                 $fp = curl_init();
1750
                 $fp = curl_init();
1751
                 $headers2 = array();
1751
                 $headers2 = array();
1991
         $relative = trim($relative);
1991
         $relative = trim($relative);
1992
         $base = trim($base);
1992
         $base = trim($base);
1993
         if (!empty($relative)) {
1993
         if (!empty($relative)) {
1994
-            $relative = SimplePie_Misc::parse_url($relative, false);
1994
+            $relative = (new SimplePie_Misc)->parse_url($relative, false);
1995
             $relative = array('scheme' => $relative[2], 'authority' => $relative[3], 'path' => $relative[5], 'query' => $relative[7], 'fragment' => $relative[9]);
1995
             $relative = array('scheme' => $relative[2], 'authority' => $relative[3], 'path' => $relative[5], 'query' => $relative[7], 'fragment' => $relative[9]);
1996
             if (!empty($relative['scheme'])) {
1996
             if (!empty($relative['scheme'])) {
1997
                 $target = $relative;
1997
                 $target = $relative;
1998
             } elseif (!empty($base)) {
1998
             } elseif (!empty($base)) {
1999
-                $base = SimplePie_Misc::parse_url($base, false);
1999
+                $base = (new SimplePie_Misc)->parse_url($base, false);
2000
                 $base = array('scheme' => $base[2], 'authority' => $base[3], 'path' => $base[5], 'query' => $base[7], 'fragment' => $base[9]);
2000
                 $base = array('scheme' => $base[2], 'authority' => $base[3], 'path' => $base[5], 'query' => $base[7], 'fragment' => $base[9]);
2001
                 $target['scheme'] = $base['scheme'];
2001
                 $target['scheme'] = $base['scheme'];
2002
                 if (!empty($relative['authority'])) {
2002
                 if (!empty($relative['authority'])) {
2025
                                 $input = substr($input, 2);
2025
                                 $input = substr($input, 2);
2026
                             } elseif (strpos($input, '/./') === 0) {
2026
                             } elseif (strpos($input, '/./') === 0) {
2027
                                 $input = substr_replace($input, '/', 0, 3);
2027
                                 $input = substr_replace($input, '/', 0, 3);
2028
-                            } elseif (strpos($input, '/.') === 0 && SimplePie_Misc::strendpos($input, '/.') === 0) {
2028
+                            } elseif (strpos($input, '/.') === 0 && (new SimplePie_Misc)->strendpos($input, '/.') === 0) {
2029
                                 $input = substr_replace($input, '/', -2);
2029
                                 $input = substr_replace($input, '/', -2);
2030
                             } elseif (strpos($input, '/../') === 0) {
2030
                             } elseif (strpos($input, '/../') === 0) {
2031
                                 $input = substr_replace($input, '/', 0, 4);
2031
                                 $input = substr_replace($input, '/', 0, 4);
2032
                                 $target['path'] = preg_replace('/(\/)?([^\/]+)$/msiU', '', $target['path']);
2032
                                 $target['path'] = preg_replace('/(\/)?([^\/]+)$/msiU', '', $target['path']);
2033
-                            } elseif (strpos($input, '/..') === 0 && SimplePie_Misc::strendpos($input, '/..') === 0) {
2033
+                            } elseif (strpos($input, '/..') === 0 && (new SimplePie_Misc)->strendpos($input, '/..') === 0) {
2034
                                 $input = substr_replace($input, '/', 0, 3);
2034
                                 $input = substr_replace($input, '/', 0, 3);
2035
                                 $target['path'] = preg_replace('/(\/)?([^\/]+)$/msiU', '', $target['path']);
2035
                                 $target['path'] = preg_replace('/(\/)?([^\/]+)$/msiU', '', $target['path']);
2036
                             } elseif ($input == '.' || $input == '..') {
2036
                             } elseif ($input == '.' || $input == '..') {
2163
 
2163
 
2164
     public function fix_protocol($url, $http = 1)
2164
     public function fix_protocol($url, $http = 1)
2165
     {
2165
     {
2166
-        $parsed = SimplePie_Misc::parse_url($url);
2166
+        $parsed = (new SimplePie_Misc)->parse_url($url);
2167
         if (!empty($parsed['scheme']) && strtolower($parsed['scheme']) != 'http' && strtolower($parsed['scheme']) != 'https') {
2167
         if (!empty($parsed['scheme']) && strtolower($parsed['scheme']) != 'http' && strtolower($parsed['scheme']) != 'https') {
2168
-            return SimplePie_Misc::fix_protocol("$parsed[authority]$parsed[path]$parsed[query]$parsed[fragment]", $http);
2168
+            return (new SimplePie_Misc)->fix_protocol("$parsed[authority]$parsed[path]$parsed[query]$parsed[fragment]", $http);
2169
         }
2169
         }
2170
         if (!file_exists($url) && empty($parsed['scheme'])) {
2170
         if (!file_exists($url) && empty($parsed['scheme'])) {
2171
-            return SimplePie_Misc::fix_protocol("http://$url", $http);
2171
+            return (new SimplePie_Misc)->fix_protocol("http://$url", $http);
2172
         }
2172
         }
2173
 
2173
 
2174
         if ($http == 2 && !empty($parsed['scheme'])) {
2174
         if ($http == 2 && !empty($parsed['scheme'])) {
2233
 
2233
 
2234
     public function change_encoding($data, $input, $output)
2234
     public function change_encoding($data, $input, $output)
2235
     {
2235
     {
2236
-        $input = SimplePie_Misc::encoding($input);
2237
-        $output = SimplePie_Misc::encoding($output);
2236
+        $input = (new SimplePie_Misc)->encoding($input);
2237
+        $output = (new SimplePie_Misc)->encoding($output);
2238
 
2238
 
2239
         if ($input != $output) {
2239
         if ($input != $output) {
2240
             if (function_exists('iconv') && $input['use_iconv'] && $output['use_iconv'] && iconv($input['encoding'], "$output[encoding]//TRANSLIT", $data)) {
2240
             if (function_exists('iconv') && $input['use_iconv'] && $output['use_iconv'] && iconv($input['encoding'], "$output[encoding]//TRANSLIT", $data)) {
3117
 
3117
 
3118
     public function autodiscovery(&$file)
3118
     public function autodiscovery(&$file)
3119
     {
3119
     {
3120
-        $links = SimplePie_Misc::get_element('link', $file->body());
3120
+        $links = (new SimplePie_Misc)->get_element('link', $file->body());
3121
         $done = array();
3121
         $done = array();
3122
         foreach ($links as $link) {
3122
         foreach ($links as $link) {
3123
             if (!empty($link['attribs']['TYPE']['data']) && !empty($link['attribs']['HREF']['data']) && !empty($link['attribs']['REL']['data'])) {
3123
             if (!empty($link['attribs']['TYPE']['data']) && !empty($link['attribs']['HREF']['data']) && !empty($link['attribs']['REL']['data'])) {
3124
                 $rel = preg_split('/\s+/', strtolower(trim($link['attribs']['REL']['data'])));
3124
                 $rel = preg_split('/\s+/', strtolower(trim($link['attribs']['REL']['data'])));
3125
                 $type = preg_match('/^(application\/rss\+xml|application\/atom\+xml|application\/rdf\+xml|application\/xml\+rss|application\/xml\+atom|application\/xml\+rdf|application\/xml|application\/x\.atom\+xml|text\/xml)(;|$)/msiU', trim($link['attribs']['TYPE']['data']));
3125
                 $type = preg_match('/^(application\/rss\+xml|application\/atom\+xml|application\/rdf\+xml|application\/xml\+rss|application\/xml\+atom|application\/xml\+rdf|application\/xml|application\/x\.atom\+xml|text\/xml)(;|$)/msiU', trim($link['attribs']['TYPE']['data']));
3126
-                $href = SimplePie_Misc::absolutize_url(trim($link['attribs']['HREF']['data']), $this->file->url);
3126
+                $href = (new SimplePie_Misc)->absolutize_url(trim($link['attribs']['HREF']['data']), $this->file->url);
3127
                 if (!in_array($href, $done) && in_array('alternate', $rel) && $type) {
3127
                 if (!in_array($href, $done) && in_array('alternate', $rel) && $type) {
3128
                     $feed = $this->is_feed($href);
3128
                     $feed = $this->is_feed($href);
3129
                     if ($feed) {
3129
                     if ($feed) {
3138
 
3138
 
3139
     public function get_links(&$file)
3139
     public function get_links(&$file)
3140
     {
3140
     {
3141
-        $links = SimplePie_Misc::get_element('a', $file->body());
3141
+        $links = (new SimplePie_Misc)->get_element('a', $file->body());
3142
         foreach ($links as $link) {
3142
         foreach ($links as $link) {
3143
             if (!empty($link['attribs']['HREF']['data'])) {
3143
             if (!empty($link['attribs']['HREF']['data'])) {
3144
                 $href = trim($link['attribs']['HREF']['data']);
3144
                 $href = trim($link['attribs']['HREF']['data']);
3145
-                $parsed = SimplePie_Misc::parse_url($href);
3145
+                $parsed = (new SimplePie_Misc)->parse_url($href);
3146
                 if (empty($parsed['scheme']) || $parsed['scheme'] != 'javascript') {
3146
                 if (empty($parsed['scheme']) || $parsed['scheme'] != 'javascript') {
3147
-                    $current = SimplePie_Misc::parse_url($this->file->url);
3147
+                    $current = (new SimplePie_Misc)->parse_url($this->file->url);
3148
                     if (empty($parsed['authority']) || $parsed['authority'] == $current['authority']) {
3148
                     if (empty($parsed['authority']) || $parsed['authority'] == $current['authority']) {
3149
-                        $this->local[] = SimplePie_Misc::absolutize_url($href, $this->file->url);
3149
+                        $this->local[] = (new SimplePie_Misc)->absolutize_url($href, $this->file->url);
3150
                     } else {
3150
                     } else {
3151
-                        $this->elsewhere[] = SimplePie_Misc::absolutize_url($href, $this->file->url);
3151
+                        $this->elsewhere[] = (new SimplePie_Misc)->absolutize_url($href, $this->file->url);
3152
                     }
3152
                     }
3153
                 }
3153
                 }
3154
             }
3154
             }
3168
     public function extension(&$array)
3168
     public function extension(&$array)
3169
     {
3169
     {
3170
         foreach ($array as $key => $value) {
3170
         foreach ($array as $key => $value) {
3171
-            $value = SimplePie_Misc::absolutize_url($value, $this->file->url);
3171
+            $value = (new SimplePie_Misc)->absolutize_url($value, $this->file->url);
3172
             if (in_array(strrchr($value, '.'), array('.rss', '.rdf', '.atom', '.xml'))) {
3172
             if (in_array(strrchr($value, '.'), array('.rss', '.rdf', '.atom', '.xml'))) {
3173
                 if ($this->is_feed($value)) {
3173
                 if ($this->is_feed($value)) {
3174
                     return $value;
3174
                     return $value;
3183
     public function body(&$array)
3183
     public function body(&$array)
3184
     {
3184
     {
3185
         foreach ($array as $key => $value) {
3185
         foreach ($array as $key => $value) {
3186
-            $value = SimplePie_Misc::absolutize_url($value, $this->file->url);
3186
+            $value = (new SimplePie_Misc)->absolutize_url($value, $this->file->url);
3187
             if (preg_match('/(rss|rdf|atom|xml)/i', $value)) {
3187
             if (preg_match('/(rss|rdf|atom|xml)/i', $value)) {
3188
                 if ($this->is_feed($value)) {
3188
                 if ($this->is_feed($value)) {
3189
                     return $value;
3189
                     return $value;
3874
 
3874
 
3875
     public function set_item_class($class = 'SimplePie_Item')
3875
     public function set_item_class($class = 'SimplePie_Item')
3876
     {
3876
     {
3877
-        if (SimplePie_Misc::is_a_class($class, 'SimplePie_Item')) {
3877
+        if ((new SimplePie_Misc)->is_a_class($class, 'SimplePie_Item')) {
3878
             $this->item_class = $class;
3878
             $this->item_class = $class;
3879
             return true;
3879
             return true;
3880
         }
3880
         }
3883
 
3883
 
3884
     public function set_author_class($class = 'SimplePie_Author')
3884
     public function set_author_class($class = 'SimplePie_Author')
3885
     {
3885
     {
3886
-        if (SimplePie_Misc::is_a_class($class, 'SimplePie_Author')) {
3886
+        if ((new SimplePie_Misc)->is_a_class($class, 'SimplePie_Author')) {
3887
             $this->author_class = $class;
3887
             $this->author_class = $class;
3888
             return true;
3888
             return true;
3889
         }
3889
         }
3892
 
3892
 
3893
     public function set_enclosure_class($class = 'SimplePie_Enclosure')
3893
     public function set_enclosure_class($class = 'SimplePie_Enclosure')
3894
     {
3894
     {
3895
-        if (SimplePie_Misc::is_a_class($class, 'SimplePie_Enclosure')) {
3895
+        if ((new SimplePie_Misc)->is_a_class($class, 'SimplePie_Enclosure')) {
3896
             $this->enclosure_class = $class;
3896
             $this->enclosure_class = $class;
3897
             return true;
3897
             return true;
3898
         }
3898
         }
3914
         }
3914
         }
3915
         // FeedBurner feeds use alternate link
3915
         // FeedBurner feeds use alternate link
3916
         elseif (strpos($url, 'http://feeds.feedburner.com/') !== 0) {
3916
         elseif (strpos($url, 'http://feeds.feedburner.com/') !== 0) {
3917
-            $this->feed_xmlbase = SimplePie_Misc::parse_url($url);
3917
+            $this->feed_xmlbase = (new SimplePie_Misc)->parse_url($url);
3918
             if (empty($this->feed_xmlbase['authority'])) {
3918
             if (empty($this->feed_xmlbase['authority'])) {
3919
                 $this->feed_xmlbase = preg_replace('/^' . preg_quote(realpath($_SERVER['DOCUMENT_ROOT']), '/') . '/', '', realpath($url));
3919
                 $this->feed_xmlbase = preg_replace('/^' . preg_quote(realpath($_SERVER['DOCUMENT_ROOT']), '/') . '/', '', realpath($url));
3920
             } else {
3920
             } else {
4023
 
4023
 
4024
                 // Item level xml:base
4024
                 // Item level xml:base
4025
                 if (!empty($item['attribs']['XML:BASE'])) {
4025
                 if (!empty($item['attribs']['XML:BASE'])) {
4026
-                    $this->item_xmlbase = SimplePie_Misc::absolutize_url($item['attribs']['XML:BASE'], $this->feed_xmlbase);
4026
+                    $this->item_xmlbase = (new SimplePie_Misc)->absolutize_url($item['attribs']['XML:BASE'], $this->feed_xmlbase);
4027
                 } elseif (!empty($item['attribs']['HTTP://WWW.W3.ORG/XML/1998/NAMESPACE:BASE'])) {
4027
                 } elseif (!empty($item['attribs']['HTTP://WWW.W3.ORG/XML/1998/NAMESPACE:BASE'])) {
4028
-                    $this->item_xmlbase = SimplePie_Misc::absolutize_url($item['attribs']['HTTP://WWW.W3.ORG/XML/1998/NAMESPACE:BASE'], $this->feed_xmlbase);
4028
+                    $this->item_xmlbase = (new SimplePie_Misc)->absolutize_url($item['attribs']['HTTP://WWW.W3.ORG/XML/1998/NAMESPACE:BASE'], $this->feed_xmlbase);
4029
                 } else {
4029
                 } else {
4030
                     $this->item_xmlbase = null;
4030
                     $this->item_xmlbase = null;
4031
                 }
4031
                 }
4259
 
4259
 
4260
         // If Bypass Image Hotlink is enabled, rewrite all the image tags.
4260
         // If Bypass Image Hotlink is enabled, rewrite all the image tags.
4261
         if ($this->bypass_image_hotlink) {
4261
         if ($this->bypass_image_hotlink) {
4262
-            $images = SimplePie_Misc::get_element('img', $data);
4262
+            $images = (new SimplePie_Misc)->get_element('img', $data);
4263
             foreach ($images as $img) {
4263
             foreach ($images as $img) {
4264
                 if (!empty($img['attribs']['SRC']['data'])) {
4264
                 if (!empty($img['attribs']['SRC']['data'])) {
4265
                     $pre = '';
4265
                     $pre = '';
4268
                     }
4268
                     }
4269
                     $pre .= "?$this->bypass_image_hotlink=";
4269
                     $pre .= "?$this->bypass_image_hotlink=";
4270
                     $img['attribs']['SRC']['data'] = $pre . rawurlencode(strtr($img['attribs']['SRC']['data'], array_flip(get_html_translation_table(HTML_SPECIALCHARS, ENT_QUOTES))));
4270
                     $img['attribs']['SRC']['data'] = $pre . rawurlencode(strtr($img['attribs']['SRC']['data'], array_flip(get_html_translation_table(HTML_SPECIALCHARS, ENT_QUOTES))));
4271
-                    $data = str_replace($img['full'], SimplePie_Misc::element_implode($img), $data);
4271
+                    $data = str_replace($img['full'], (new SimplePie_Misc)->element_implode($img), $data);
4272
                 }
4272
                 }
4273
             }
4273
             }
4274
         }
4274
         }
4291
         }
4291
         }
4292
 
4292
 
4293
         // Convert encoding
4293
         // Convert encoding
4294
-        $data = SimplePie_Misc::change_encoding($data, $this->input_encoding, $this->output_encoding);
4294
+        $data = (new SimplePie_Misc)->change_encoding($data, $this->input_encoding, $this->output_encoding);
4295
 
4295
 
4296
         return $data;
4296
         return $data;
4297
     }
4297
     }
4324
         }
4324
         }
4325
         if (!empty($xmlbase)) {
4325
         if (!empty($xmlbase)) {
4326
             if (!empty($this->item_xmlbase)) {
4326
             if (!empty($this->item_xmlbase)) {
4327
-                $xmlbase = SimplePie_Misc::absolutize_url($xmlbase, $this->item_xmlbase);
4327
+                $xmlbase = (new SimplePie_Misc)->absolutize_url($xmlbase, $this->item_xmlbase);
4328
             } else {
4328
             } else {
4329
-                $xmlbase = SimplePie_Misc::absolutize_url($xmlbase, $this->feed_xmlbase);
4329
+                $xmlbase = (new SimplePie_Misc)->absolutize_url($xmlbase, $this->feed_xmlbase);
4330
             }
4330
             }
4331
         } elseif (!empty($this->item_xmlbase)) {
4331
         } elseif (!empty($this->item_xmlbase)) {
4332
             $xmlbase = $this->item_xmlbase;
4332
             $xmlbase = $this->item_xmlbase;
4335
         }
4335
         }
4336
 
4336
 
4337
         if ($raw_url) {
4337
         if ($raw_url) {
4338
-            return SimplePie_Misc::absolutize_url($data, $xmlbase);
4338
+            return (new SimplePie_Misc)->absolutize_url($data, $xmlbase);
4339
         } else {
4339
         } else {
4340
             $attributes = array(
4340
             $attributes = array(
4341
                 'background',
4341
                 'background',
4353
             );
4353
             );
4354
             foreach ($attributes as $attribute) {
4354
             foreach ($attributes as $attribute) {
4355
                 if (preg_match("/$attribute='(.*)'/siU", $data[0], $attrib) || preg_match("/$attribute=\"(.*)\"/siU", $data[0], $attrib) || preg_match("/$attribute=(.*)[ |\/|>]/siU", $data[0], $attrib)) {
4355
                 if (preg_match("/$attribute='(.*)'/siU", $data[0], $attrib) || preg_match("/$attribute=\"(.*)\"/siU", $data[0], $attrib) || preg_match("/$attribute=(.*)[ |\/|>]/siU", $data[0], $attrib)) {
4356
-                    $new_tag = str_replace($attrib[1], SimplePie_Misc::absolutize_url($attrib[1], $xmlbase), $attrib[0]);
4356
+                    $new_tag = str_replace($attrib[1], (new SimplePie_Misc)->absolutize_url($attrib[1], $xmlbase), $attrib[0]);
4357
                     $data[0] = str_replace($attrib[0], $new_tag, $data[0]);
4357
                     $data[0] = str_replace($attrib[0], $new_tag, $data[0]);
4358
                 }
4358
                 }
4359
             }
4359
             }
4371
         if (isset($this->cached_entities[$data[0]])) {
4371
         if (isset($this->cached_entities[$data[0]])) {
4372
             return $this->cached_entities[$data[0]];
4372
             return $this->cached_entities[$data[0]];
4373
         } else {
4373
         } else {
4374
-            $return = SimplePie_Misc::change_encoding(html_entity_decode($data[0], ENT_QUOTES), 'ISO-8859-1', $this->input_encoding);
4374
+            $return = (new SimplePie_Misc)->change_encoding(html_entity_decode($data[0], ENT_QUOTES), 'ISO-8859-1', $this->input_encoding);
4375
             if ($return == $data[0]) {
4375
             if ($return == $data[0]) {
4376
-                $return = SimplePie_Misc::change_encoding(preg_replace_callback('/&#([x]?[0-9a-f]+);/mi', array(&$this, 'replace_num_entity'), $data[0]), 'UTF-8', $this->input_encoding);
4376
+                $return = (new SimplePie_Misc)->change_encoding(preg_replace_callback('/&#([x]?[0-9a-f]+);/mi', array(&$this, 'replace_num_entity'), $data[0]), 'UTF-8', $this->input_encoding);
4377
             }
4377
             }
4378
             $this->cached_entities[$data[0]] = $return;
4378
             $this->cached_entities[$data[0]] = $return;
4379
             return $return;
4379
             return $return;