Replace bare <image> in feed items with namespaced <ssp:image> #841#900
Conversation
RSS 2.0 only allows <image> at the channel level. The bare tag in feed items broke W3C validation and Spotify ingestion. Co-Authored-By: Claude via AIContext
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughFeed templates and stylesheet adopt an ChangesRSS Image Namespace
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@templates/feed/feed-item.php`:
- Around line 70-73: The ssp:title element is double-encoding the pre-escaped
title by calling esc_attr( $title ); update the template so the <ssp:title> echo
uses the already-escaped $title directly (replace the esc_attr( $title ) usage
in templates/feed/feed-item.php with a bare echo of $title) to match the
existing usage at the top of the file and avoid producing entities like
&amp; in the output.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 18798eb9-1af1-433d-9b48-6e5c9bb370e6
📒 Files selected for processing (4)
php/classes/handlers/class-feed-handler.phptemplates/feed-podcast.phptemplates/feed-stylesheet.xsltemplates/feed/feed-item.php
Co-Authored-By: Claude via AIContext
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tests/WPUnit/FeedControllerTest.php (1)
77-97: ⚡ Quick winAdd a direct assertion for item-level
<ssp:image>behavior.This test now checks the namespace declaration, but it still doesn’t directly verify the core item-level replacement (
<image>→<ssp:image>) in an image-present episode case. Please add/assert that scenario so regressions are caught at the behavior this PR is targeting.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/WPUnit/FeedControllerTest.php` around lines 77 - 97, Update the FeedControllerTest item expectations to assert the item-level image replacement: inside the test that builds the $expected item block (the array around '<item>'...'</item>') add an expectation for the new '<ssp:image>' element for the episode (using the same $episode_id context used elsewhere in the test) and/or assert the rendered feed contains '<ssp:image' and does not contain the legacy '<image>' for that item; locate the assertion code in FeedControllerTest.php near the $episode_id and $expected item array and add the new expectation so the test explicitly checks item-level '<ssp:image>' behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@tests/WPUnit/FeedControllerTest.php`:
- Around line 77-97: Update the FeedControllerTest item expectations to assert
the item-level image replacement: inside the test that builds the $expected item
block (the array around '<item>'...'</item>') add an expectation for the new
'<ssp:image>' element for the episode (using the same $episode_id context used
elsewhere in the test) and/or assert the rendered feed contains '<ssp:image' and
does not contain the legacy '<image>' for that item; locate the assertion code
in FeedControllerTest.php near the $episode_id and $expected item array and add
the new expectation so the test explicitly checks item-level '<ssp:image>'
behavior.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: d888cca0-cf02-403d-bb4d-fbe0ddd2a39d
📒 Files selected for processing (1)
tests/WPUnit/FeedControllerTest.php
Co-Authored-By: Claude via AIContext
Summary
<image>element in feed items with namespaced<ssp:image>to fix RSS 2.0 validation and Spotify feed ingestion (Version 3.10.0-alpha.6 #841)xmlns:sspnamespace in the RSS root element?v=2cache-buster to XSL stylesheet URLTest plan
<ssp:image>, no bare<image>in items<image>is unchanged<image>errors in itemsSummary by CodeRabbit