Skip to content

Use dc:creator instead of email-less author#30

Open
hugovk wants to merge 1 commit intopython:mainfrom
hugovk:dc-creator
Open

Use dc:creator instead of email-less author#30
hugovk wants to merge 1 commit intopython:mainfrom
hugovk:dc-creator

Conversation

@hugovk
Copy link
Member

@hugovk hugovk commented Mar 4, 2026

Fixes #29.

<author> is meant to include an email address.

Instead, we can use <dc:creator>:

The value of the dc:creator element is less restrictive than the author element, which must contain an e-mail address. Publishers often rely on dc:creator to credit authorship without revealing e-mail addresses in a form that can be exploited by spammers.

https://www.rssboard.org/rss-profile#namespace-elements-dublin-creator

Copilot AI review requested due to automatic review settings March 4, 2026 11:49
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the site’s RSS feed generation to comply with RSS spec requirements around the <author> element (email required) by switching to the Dublin Core dc:creator element for author credit.

Changes:

  • Add the Dublin Core namespace (xmlns:dc) to the generated RSS document.
  • Replace RSS <author> output with an item-level <dc:creator> entry via customData.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

description: post.data.description ?? "",
link: withBase(`${postUrl(post.id, post.data.publishDate)}/`),
author: post.data.author,
customData: `<dc:creator>${post.data.author}</dc:creator>`,
Copy link

Copilot AI Mar 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

customData is injected into the RSS output as raw XML. If post.data.author contains XML-reserved characters (e.g. &, <, >), this will produce malformed RSS and could allow XML injection. Escape the author value (or wrap it in a CDATA section) before interpolating it into <dc:creator>.

Copilot uses AI. Check for mistakes.
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.

Malformed author tag.

2 participants