Handle uppercase SVG favicons#918
Conversation
❌ Deploy Preview for fedify-json-schema failed.
|
There was a problem hiding this comment.
Code Review
This pull request updates the getFaviconUrl function to handle uppercase .SVG extensions by converting the href attribute to lowercase before checking its suffix, and adds a corresponding test case. The reviewer suggested a robust improvement to parse the URL first and check the pathname to handle cases with query parameters or hash fragments (e.g., /icon.svg?v=1).
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
📝 WalkthroughWalkthroughThe ChangesSVG Favicon Fallback Fix
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related issues
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests.
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
dahlia
left a comment
There was a problem hiding this comment.
Thanks for your contribution. However, since it's a bug fix, it should target 2.0-maintenance instead of main. Please read our CONTRIBUTING.md first.
Check the parsed favicon URL pathname before deciding whether an icon is SVG. This keeps query strings and fragments from hiding SVG favicon paths. Assisted-by: Hermes Agent:gpt-5.5
6a225bb to
9b8c093
Compare
|
@dahlia Thanks for the review. I've rebased the branch onto |
dahlia
left a comment
There was a problem hiding this comment.
Could you add a changelog entry to CHANGES.md? Don't miss adding your credit as well.
Add the required changelog entry for the nodeinfo SVG favicon fallback bug fix. Assisted-by: Hermes Agent:gpt-5.5
|
@dahlia Thanks again—I've also added the required |
dahlia
left a comment
There was a problem hiding this comment.
Thanks for your first contribution!
Summary
.SVGfavicon links, including query strings and fragments.CHANGES.mdentry.Test plan
mise exec -- hongdown --check CHANGES.mdmise exec -- deno task -f @fedify/cli test --filter "getFaviconUrl"mise run check-each cliCloses #891
AI assistance disclosure: Hermes Agent helped prepare and verify the local change.