From: Andrew Dolgov Date: Sat, 20 Nov 2010 13:23:23 +0000 (+0300) Subject: better feed url checking X-Git-Tag: 1.5.0~109 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=ec39a02cd89ee48c0a568c7edbb6b45a1218e3ef;p=tt-rss.git better feed url checking --- diff --git a/functions.php b/functions.php index 7f287e7c..7d23a409 100644 --- a/functions.php +++ b/functions.php @@ -2892,7 +2892,8 @@ $auth_login = '', $auth_pass = '') { $url = fix_url($url); - if (!validate_feed_url($url)) return 2; + + if (!$url || !validate_feed_url($url)) return 2; if (!fetch_file_contents($url)) return 5; if (url_is_html($url)) { @@ -6450,7 +6451,11 @@ if (strpos($url, '/', strpos($url, ':') + 3) === false) { $url .= '/'; } - return $url; + + if ($url != "http:///") + return $url; + else + return ''; } function validate_feed_url($url) {