mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-18 06:45:33 +00:00
Bug #304704 --> Make Thunderbird open feed:// urls from the desktop in addition to feed:
sr=bienvenu
This commit is contained in:
parent
992d916bc8
commit
3840a88fdc
@ -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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user