]> git.wh0rd.org - tt-rss.git/blobdiff - include/functions.php
Added ltrim to in fetch_file_contents to fix edge cases where a URL has one or more...
[tt-rss.git] / include / functions.php
index ac8fb6302904237725ecd88f77f097483d8d6c21..d783bd8531b2dbaf55593f0acd50425b82cd6900 100644 (file)
                global $fetch_last_content_type;
                global $fetch_curl_used;
 
+               $url = ltrim($url, ' ');
                $url = str_replace(' ', '%20', $url);
 
                if (!defined('NO_CURL') && function_exists('curl_init')) {
                        $url = key($feedUrls);
                }
 
-               /* libxml_use_internal_errors(true);
-               $doc = new DOMDocument();
-               $doc->loadXML($contents);
-               $error = libxml_get_last_error();
-               libxml_clear_errors();
-
-               if ($error) {
-                       $error_message = format_libxml_error($error);
-
-                       return array("code" => 6, "message" => $error_message);
-               } */
-
                if ($cat_id == "0" || !$cat_id) {
                        $cat_qpart = "NULL";
                } else {