Improve OPML conformance#1366
Merged
Merged
Conversation
Looking at an OPML file exported from Google Reader, it actually used both `title` and `text` attributes on both `[type=text]` and `[type=rss]` `outline` elements: https://web.archive.org/web/20150106233853/https://dl.dropboxusercontent.com/u/670189/google-reader-subscriptions.xml (obtained from https://stackoverflow.com/questions/5761771/how-do-you-extract-feed-urls-from-an-opml-file-exported-from-google-reader) This is invalid. The OPML spec only allows `title` for `[type=rss]` But Feedly emulates Google Reader and probably is not the only one, judging by the single bug report with little traffic over the years, even though it was incorrect since the initial implementation: 70d03c4 Let’s continue to use the `title` attribute for tag names as Feedly does since non-conformant producers might neglect `text`, and fall back on the mandatory `text` for conformant OPML files. Fixes: #600
Falling back to `title` attribute when `text` is not present does not make sense for valid OPML files as `text` is mandatory. Well, the attribute could still be empty but I would still call that nonsensical. Apparently, it was introduced for Netvibes, which only includes `title` and no `text`: cfc6590 Let’s look at `title` first like Feedly does.
This will come in especially handy with the next commit, which will pass along messages from the XML parser. Ideally, we would merge the import page with the rest of the APP and have React handle the escaping but we are not there yet.
… type Some operating systems might not know about OPML and return `application/octet-stream`. Let’s try to allow any MIME type first and only report wrong type when parsing fails. Fixes: #730
✅ Deploy Preview for selfoss canceled.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
textattribute for tag namestitleattribute for source names