Skip to content

fix(rss): preserve complete feed content and resolve relative link - #2432

Merged
Adam Fourney (afourney) merged 3 commits into
mainfrom
rss_text
Sep 9, 2026
Merged

Adam Fourney (afourney) merged 3 commits into
mainfrom
rss_text

Conversation

@afourney

Copy link
Copy Markdown
Member

RSS and Atom conversion could truncate values at CDATA boundaries or drop nested content. Reading only the first child
could discard an entire article body when its CDATA section followed indentation.

This change reads complete field values in document order and interprets them according to their content type:

  • Preserves text and CDATA, extracts readable titles, and retains formatting in HTML/XHTML bodies.
  • Supports typed Atom titles and subtitles while preserving literal text in plain-text fields.
  • Selects fields from their immediate parent, preventing missing feed metadata from being borrowed from entries.
  • Resolves relative hyperlinks and image URLs using the source URL and inherited xml:base, including nested overrides.
  • Preserves deep-content fallback behavior and separates summaries and bodies without adding separators for empty
    content.

For example, <title>nested trailing</title> now produces the complete title nested trailing.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Title normalization now incorrectly collapses significant intra-line whitespace.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Improves RSS/Atom conversion fidelity and URL handling.

Changes:

  • Preserves complete mixed XML, CDATA, HTML, and XHTML content.
  • Restricts metadata lookup to direct children.
  • Resolves relative links using source URLs and xml:base.
File summaries
File Description
_rss_converter.py Implements content extraction and URL resolution.
test_rss_converter.py Tests bodies, links, namespaces, and fallbacks.
test_rss_titles.py Tests complete and typed titles.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.

2 participants