Always trim URL when adding a new subscription

This commit is contained in:
Frederic Guillot 2017-01-03 20:07:56 -05:00
parent daf951795f
commit c0c77eeed3

View File

@ -63,6 +63,7 @@ function fetch_feed($url, $download_content = false, $etag = '', $last_modified
function create_feed($user_id, $url, $download_content = false, $rtl = false, $cloak_referrer = false, array $feed_group_ids = array(), $group_name = null) function create_feed($user_id, $url, $download_content = false, $rtl = false, $cloak_referrer = false, array $feed_group_ids = array(), $group_name = null)
{ {
$feed_id = null; $feed_id = null;
$url = trim($url);
list($feed, $resource, $error_message) = fetch_feed($url, $download_content); list($feed, $resource, $error_message) = fetch_feed($url, $download_content);
if ($feed !== null) { if ($feed !== null) {