Skip to content

fix: recognize feed links whose rel is not exactly "alternate" - #1013

Merged
adbar merged 1 commit into
adbar:masterfrom
RavSinghChandan:feed-rel-alternate-tokens
Oct 28, 2026
Merged

adbar merged 1 commit into
adbar:masterfrom
RavSinghChandan:feed-rel-alternate-tokens

Conversation

@RavSinghChandan

Copy link
Copy Markdown
Contributor

determine_feed() selects feed links with //link[@rel="alternate"], an exact string match. In HTML, rel is a case-insensitive list of space-separated keywords, so feeds declared as <link rel="Alternate" ...>, rel="ALTERNATE", rel="alternate feed" or with surrounding spaces were not found at all, and the <a href> backup does not look at <link> elements. The type attribute is already normalized for case and ; charset= suffixes; rel was not.

Links are now kept when alternate is one of their rel keywords, compared case-insensitively. Other links, such as stylesheets or rel="alternative", are still ignored. Added a test next to test_determine_feed_type_normalization.

@codecov

codecov Bot commented Oct 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.95%. Comparing base (399eeac) to head (5100f4c).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1013   +/-   ##
=======================================
  Coverage   99.95%   99.95%           
=======================================
  Files          21       21           
  Lines        4358     4358           
=======================================
  Hits         4356     4356           
  Misses          2        2           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@adbar
adbar merged commit f2edb67 into adbar:master Oct 28, 2026
15 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.

2 participants