Skip to content

fix(feed): list post authors as dc:creator instead of Atom-style author - #2578

Open
NopeCharon wants to merge 1 commit into
expressjs:mainfrom
NopeCharon:fix/rss-author-elements
Open

NopeCharon wants to merge 1 commit into
expressjs:mainfrom
NopeCharon:fix/rss-author-elements

Conversation

@NopeCharon

Copy link
Copy Markdown
Contributor

Fixes #2577

Both feeds (/feed.xml and /vulnerabilities.xml) wrote each author as an Atom-style <author><name>…</name><uri>…</uri></author>. RSS 2.0's <author> has to contain an email address, so validators reject those items and readers drop the author. Each author is now written as a Dublin Core <dc:creator>, and both feeds declare the dc namespace through a shared RSS_NAMESPACES constant.

Item author markup
Before <author><name>Ulises Gascon</name><uri>https://github.com/UlisesGascon</uri></author>
After <dc:creator>Ulises Gascon</dc:creator>

RSS has nowhere to put an author URI, so the GitHub profile link no longer appears in the feeds. The site still shows it. Author names are also XML-escaped now: @astrojs/rss parses customData as XML, so a < in a name would have been read as markup.

Validation

  • New tests/unit/rss.test.mjs renders a feed through @astrojs/rss's getRssString() and checks the namespace, the dc:creator elements and the escaping. The author tests fail on main, and the escaping test fails without the escaping. The tests pass on Node.js 24.15 (the .nvmrc version) and on 24.22.
  • npm run check and npm run test:unit (71 tests) pass.
  • npm run build passes. Both generated feeds declare xmlns:dc, contain no <author> elements, and parse as well-formed XML.

Both feeds built each item's authors as
<author><name>…</name><uri>…</uri></author>. That is Atom markup. In
RSS 2.0, <author> is a text element that must hold an email address, and
<name>/<uri> are not defined inside it, so feed validators reject the
items and readers ignore the author.

getAuthorsCustomData() now emits one Dublin Core <dc:creator> element per
author, which is the usual way to name authors in RSS. Both feeds declare
the dc namespace through a shared RSS_NAMESPACES constant passed to
@astrojs/rss as `xmlns`. RSS has no equivalent of the author URI, so the
GitHub profile link is dropped from the feeds; it is still shown on the
site.

Author names are now XML-escaped. @astrojs/rss parses customData as XML,
so a name containing "<" used to be read as markup.

Add tests/unit/rss.test.mjs, which renders a feed through @astrojs/rss's
getRssString() and checks for the namespace, the dc:creator elements and
the escaping.

Fixes expressjs#2577

Signed-off-by: NopeCharon <115794254+NopeCharon@users.noreply.github.com>
@NopeCharon
NopeCharon requested a review from a team as a code owner November 11, 2026 15:15
@netlify

netlify Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for expressjscom-preview ready!

Name Link
🔨 Latest commit 5a0083a
🔍 Latest deploy log https://app.netlify.com/projects/expressjscom-preview/deploys/6af4867b24dd8fcac2aafb85
😎 Deploy Preview https://deploy-preview-2578--expressjscom-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 98 (🟢 up 1 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RSS feeds use Atom-style <author> elements, which are invalid in RSS 2.0

1 participant