feed icon indicating copy to clipboard operation
feed copied to clipboard

RSS2 feed should use id instead of feed

Open jooola opened this issue 4 years ago • 0 comments

Describe the bug

I am sure if the RSS feed should use FeedOptions.id instead of FeedOptions.feed, as the feed attribute is only used by rss2 and the id attribute is used by json and atom.

The Id is usually an URL to the website, but is it safe to say that it will always be an URL ? If yes, we could use the ID in the RSS2 feed as well.

This is the only place the feed attribute is used, in rss2.ts

  /**
   * Feed URL
   * http://validator.w3.org/feed/docs/warning/MissingAtomSelfLink.html
   */
  const atomLink = options.feed || (options.feedLinks && options.feedLinks.rss);
  if (atomLink) {
    isAtom = true;
    base.rss.channel["atom:link"] = [
      {
        _attributes: {
          href: sanitize(atomLink),
          rel: "self",
          type: "application/rss+xml",
        },
      },
    ];
  }

jooola avatar May 24 '21 18:05 jooola