When adding a new feed (via Home › Administer › Content management › Feed aggregator), provide support for the “feed://” URL scheme in addition to “http://”.
The “feed://” URL scheme is used internally on Mac OS X and commonly generated by the Safari browser when clicking on the “RSS” icon to view feeds in this browser. When a feed is subsequently viewed in Safari, its “feed://” URL — not an “http://” URL — is displayed in the browser’s location field as the current location. Therefore, it becomes easily copied for pasting into Drupal’s administration screens — and could potentially be pulled via scripts, bookmarklets, or other means.
The Aggregator module dutifully responds to these URLs with the error below. For example, when trying to submit the feed of “feed://example.com/feed” it returns:
“The URL feed://example.com/feed is invalid. Please enter a fully-qualified URL, such as http://www.example.com/feed.xml.”
It would save a manual step for users of Safari — and perhaps other apps on Mac OS X — if the Aggregator module would support and handle “feed://” URLs directly. Perhaps it can be a configuration choice for the Aggregator to treat them as standard HTTP feed URLs. If it were to be a configuration option, I would suggest that it be enabled by default. Translations from the “feed://” to “http://” scheme could be logged in the Drupal logs when they happen, and an on-screen notice could be provided on the feed entry screen that says that the URL was translated successfully (or not) after it is submitted in the form.
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | 499774_11.patch | 1.08 KB | jbrauer |
| #6 | 499774_6.patch | 1.11 KB | jbrauer |
| #2 | 499774.patch | 1.11 KB | jbrauer |
Comments
Comment #1
sun.core commentedComment #2
jbrauer commentedHere's a two-line patch that adds support for accepting and using feed:// URL's. Although it's most useful in aggregator in core it's really base functionality from common.inc that needs to be altered.
Comment #3
gábor hojtsyI've seen many people bump into this. Not sure that this should be as far off as 8.x. We've added in missing MIME types even to Drupal 6.x, so fully compatible "protocols", like feed:// would be fine to add to 7.x right away I believe.
Comment #4
jbrauer commentedUpdating title since this affects more than the aggregator module.
Comment #5
aspilicious commented- (?:ftp|https?):\/\/ # Look for ftp, http, or https schemes
+ (?:ftp|https?|feed):\/\/ # Look for ftp, http, or https schemes
comment needs a little work
Comment #6
jbrauer commented@aspilicious thanks! Updated patch attached.
Comment #7
Nick Lewis commentedThis patch is extremely small, the changes straightforward, and its one small step to making drupal less annoying to the humans to use it. Assuming tests pass RTBC
Comment #8
dries commentedCommitted to CVS HEAD. Thanks.
Comment #10
jbrauer commentedwe should do this for D6 as well
Comment #11
jbrauer commentedPatch for Drupal 6
Comment #12
gábor hojtsyCommitted, thanks.