]> git.wh0rd.org - tt-rss.git/blobdiff - include/functions.php
Обновить 'include/functions.php'
[tt-rss.git] / include / functions.php
index 8e9949f75896215c5edc23e13ef817e573b733c9..6a12963902d80566e882beff125e4ca9d65e0330 100755 (executable)
 
                         $context_options = array(
                                  'http' => array(
+                                               'header' => array(
+                                                       'Connection: close'
+                                               ),
                                                'method' => 'GET',
                                                'ignore_errors' => true,
                                                'timeout' => $timeout ? $timeout : FILE_FETCH_TIMEOUT,
                        if ($entry->nodeName == 'img') {
                                $entry->setAttribute('referrerpolicy', 'no-referrer');
 
+                               $entry->removeAttribute('width');
+                               $entry->removeAttribute('height');
+
                                if ($entry->hasAttribute('src')) {
                                        $is_https_url = parse_url($entry->getAttribute('src'), PHP_URL_SCHEME) === 'https';
 
        }
 
        function tag_is_valid($tag) {
-               if ($tag == '') return false;
-               if (is_numeric($tag)) return false;
-               if (mb_strlen($tag) > 250) return false;
-
-               if (!$tag) return false;
+               if (!$tag || is_numeric($tag) || mb_strlen($tag) > 250)
+                       return false;
 
                return true;
        }