-
-
Notifications
You must be signed in to change notification settings - Fork 217
Open
Description
Describe the bug
The options.description parameter is documented as optional, and the atom and json formats handle this by omitting this optional field in their output. The RSS2 format requires a <description> element and so we can't omit it. But, combined with the fact that the Feed class takes an optional description, means we serialize <description>undefined</description> which then ends up on-screen in feed readers.
To Reproduce
Steps to reproduce the behavior:
new Feed()withdescriptionunset, undefined, or empty string.feed.rss2()
Example:
new Feedhttps://github.com/nodejs/nodejs.org/blob/f7e912617bd852c30766dc48edfeb74bb470dfd9/apps/site/next-data/generators/websiteFeeds.mjs#L31- data - https://github.com/nodejs/nodejs.org/blob/f7e912617bd852c30766dc48edfeb74bb470dfd9/apps/site/site.json#L12
feed.rss2()- https://github.com/nodejs/nodejs.org/blob/f7e912617bd852c30766dc48edfeb74bb470dfd9/apps/site/next-data/providers/websiteFeeds.ts#L10
Expected behavior
A clear and concise description of what you expected to happen.
Actual behavior
Example: https://nodejs.org/en/feed/blog.xml
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Node.js Blog</title>
…
<description>undefined</description>
<lastBuildDate>Mon, 18 Aug 2025 19:33:35 GMT</lastBuildDate>
<docs>https://validator.w3.org/feed/docs/rss2.html</docs>
<generator>https://github.com/jpmonette/feed</generator>
<language>en</language>Versions (please complete the following information):
- feed: 5.1.0
Metadata
Metadata
Assignees
Labels
No labels