Bug #304704 --> Make Thunderbird open feed:// urls from the desktop in addition to feed:

sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@178754 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
scott%scott-macgregor.org 2005-08-24 00:04:55 +00:00
parent 3e0b5109c5
commit 535eb820e0

View File

@ -136,11 +136,15 @@ var nsNewsBlogFeedDownloader =
if (!aFolder)
return;
// if aUrl is a feed url, then it is of the form: feed:http://somesite/feed.xml
// Strip off the feed: so we can subscribe to the contained URL.
// Questions: what about feed://, can the OS be giving us an escaped URL?
// if aUrl is a feed url, then it is of the form: feed:http://somesite/feed.xml or
// feed://http://somesite/feed.xml
// Strip off the feed: part so we can subscribe to the contained URL.
if (/^feed:/i.test(aUrl))
aUrl = aUrl.replace('feed:', '');
{
aUrl = aUrl.replace(/^feed:/i, '');
// Strip off the optional forward slashes if we were given feed://
aUrl = aUrl.replace(/^\x2f\x2f/, '');
}
// make sure we aren't already subscribed to this feed before we attempt to subscribe to it.
if (feedAlreadyExists(aUrl, aFolder.server))