Skip to content

Fix RSS validation: update itunes:explicit format to boolean#3432

Merged
tzarebczan merged 3 commits intoOdyseeTeam:masterfrom
sktbrd:fix-rss-itunes-explicit
Mar 4, 2026
Merged

Fix RSS validation: update itunes:explicit format to boolean#3432
tzarebczan merged 3 commits intoOdyseeTeam:masterfrom
sktbrd:fix-rss-itunes-explicit

Conversation

@sktbrd
Copy link
Contributor

@sktbrd sktbrd commented Feb 25, 2026

Description

Fixes RSS feed validation issues for iTunes/Apple Podcasts Connect.

Changes

This PR addresses all three issues mentioned in #2982:

  1. iTunes explicit format: Updates itunes:explicit tag format from 'yes'/'no' to 'true'/'false' to comply with current iTunes podcast requirements.

  2. Encoded URL 404 fix: Adds defer: true to koa-static configuration to allow dynamic routes (like RSS feeds) to be matched before attempting to serve static files. This fixes RSS validators returning 404 HTML instead of XML when accessing URLs with encoded characters.

  3. Language tag: Already present in the codebase with 'en' fallback (no changes needed).

Modified

  • web/src/rss.js (line 172): Changed generateItunesExplicitElement return value
  • web/index.js (line 36): Added defer: true to koa-static configuration

Testing

RSS feed validation can be confirmed using:

Test URLs with encoded characters:

  • /$/rss/My%20Channel/abc123 should return XML, not 404 HTML

Related Issue

Closes #2982

Checklist

  • Code follows the Airbnb JavaScript Style Guide
  • Changes are minimal and focused on the issue
  • No breaking changes
  • RSS feed structure remains valid
  • All three issues from RSS: validation issues #2982 are addressed

Changes 'itunes:explicit' value from 'yes'/'no' to 'true'/'false'
to comply with current iTunes/Apple Podcasts requirements.

Fixes OdyseeTeam#2982
@sktbrd sktbrd mentioned this pull request Feb 25, 2026
4 tasks
@coderabbitai
Copy link

coderabbitai bot commented Feb 25, 2026

📝 Walkthrough

Walkthrough

Updated RSS/feed-related behavior: the itunes:explicit tag now uses "true"/"false" instead of "yes"/"no", and the static file middleware now sets defer: true so dynamic routes are matched before static assets (fixing encoded-URL 404s).

Changes

Cohort / File(s) Summary
RSS iTunes explicit
web/src/rss.js
Changed generateItunesExplicitElement to emit itunes:explicit as "true"/"false" instead of "yes"/"no".
Static middleware routing
web/index.js
Added defer: true to koa-static configuration so dynamic routes take precedence over static file serving (addresses encoded-URL 404s).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A hop, a tweak, a tiny cheer,
Feeds now whisper "true" so clear.
Routes step back and let code through,
Little changes, big review. 🥕✨

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR addresses the itunes:explicit format requirement [#2982] but does not implement the language requirement. The defer middleware change addresses the 404 handling [#2982] but is not mentioned in the PR title. Complete the language requirement from #2982 or document why it's deferred. Consider updating the PR title to reflect both changes made.
Out of Scope Changes check ⚠️ Warning The addition of 'defer: true' to koa-static in web/index.js addresses issue #2982 but is not mentioned in the PR title or description, making it appear as an out-of-scope change. Update the PR description to explicitly mention the defer middleware change and its relationship to fixing 404 responses for encoded URLs.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The PR title accurately describes the main change: updating itunes:explicit format from 'yes'/'no' to 'true'/'false' for RSS validation compliance.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Adds 'defer: true' to koa-static configuration to allow dynamic routes
(like /$/rss/:claimName/:claimId) to be matched before static files.

This fixes RSS feed validators returning 404 HTML instead of XML
when accessing URLs with encoded characters (e.g., spaces as %20).

Part of OdyseeTeam#2982
@sktbrd
Copy link
Contributor Author

sktbrd commented Feb 25, 2026

Added a second commit to fix the encoded URL 404 issue mentioned in the original issue.

Additional fix

Added defer: true to koa-static configuration in web/index.js. This allows dynamic routes (like RSS feeds) to be matched before attempting to serve static files.

What this solves

When RSS validators access URLs with encoded characters (e.g., /$/rss/My%20Channel/abc123), they were getting 404 HTML pages instead of XML. Now dynamic routes are checked first, so the RSS feed is properly generated.

Changes summary

  1. itunes:explicit format: 'yes'/'no''true'/'false'
  2. ✅ Encoded URL 404 fix: Added defer: true to static middleware
  3. <language> tag: Already present with 'en' fallback (no changes needed)

All three issues from #2982 are now covered.

@tzarebczan
Copy link
Contributor

Fails on lint/CI: lint: web/index.js#L6
'router' is assigned a value but never used

@sktbrd sktbrd force-pushed the fix-rss-itunes-explicit branch from 6e0000c to 815230a Compare March 2, 2026 19:10
@sktbrd
Copy link
Contributor Author

sktbrd commented Mar 2, 2026

@tom-z You're absolutely right, and thank you for catching this!

After investigation, I discovered that during a merge from master into fix-rss-itunes-explicit, the critical line app.use(router.routes()); was accidentally deleted in the conflict resolution.

What happened:

  • ✅ Commit 815230a: Code was correct (has router.routes())
  • ❌ Merge commit 6e0000c: Line was lost during merge conflict resolution
  • Result: router declared but never used (linter was right!)

What I fixed:

  • Reset branch back to the correct commit (815230a)
  • Force-pushed to correct the remote
  • The app.use(router.routes()); line is now restored

The lint error should now be resolved. CI checks should pass.

Apologies for the oversight!

@tzarebczan tzarebczan merged commit 839a483 into OdyseeTeam:master Mar 4, 2026
3 checks passed
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: validation issues

2 participants