The undefined user_signed_in check above it was replaced with user.is_authenticated. No template in the repository fills {% block side_menu %}, so span12 is the correct class.
Preview links
frontend/frontend/templates/frontend/preview.html now builds item headings with a safeUrl helper:
only http: and https: links become anchors;
file:, javascript:, data: and other schemes are shown as plain text;
the title is inserted with .text() instead of string concatenation.
That prevents the Security Error: Content at ... may not load or link to file:/// message when a feed item has a local link.
Tests
Added to tests/test_reader_django.py:
the index page contains no <%= or content_for? markup;
the preview page uses safeUrl(item.link).
Note on the XML error
The XML parsing error comes from the feed response itself, not from the page. If /feed/2?sanitize=Y is malformed or returns an HTML error page, the preview script will still show its failure message. This PR fixes the page markup and the file:// link handling; the feed source still needs to be valid XML.
### Issue 1
tests/test_reader_django.py:101
`test_preview_page_only_links_http_urls` only checks that the page contains `safeUrl(item.link)`. It still passes if `safeUrl` returns every input unchanged or rejects every link. Add a JavaScript test that renders feed items and checks that HTTP(S) links remain clickable, blocked schemes become plain text, and HTML in titles stays text.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Summary
Removes Rails markup from the shared Django layout and makes preview headings safer.
Shared pages use Django login checks and a plain content column.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: defaults
Review profile: CHILL
Plan: Advanced
Run ID: 762556ea-9b0d-4a46-82eb-a18a9a811535
Commits
Reviewing files that changed from the base of the PR and between f14fec45bbc1a2a0c23bbca482b492e3adbcee5f and 200496cc63312dcff2c4af71cbdf109700f907b1.
Files selected for processing: 5
frontend/frontend/assets/frontend/js/preview.js
frontend/frontend/templates/base.html
frontend/frontend/templates/frontend/preview.html
tests/js/preview.test.js
tests/test_reader_django.py
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
Remove the leftover Rails markup from the shared layout, use Django’s authentication check, and render the content at full width.
frontend/frontend/templates/base.html L77-80
Tests
Add Node tests for allowed and blocked URLs, text-only rendering, and preview item handling.
tests/js/preview.test.js L1-82
Add Django regression checks for the removed Rails markup and preview renderer integration.
tests/test_reader_django.py L85-102
Tips and commands
Interacting with Sourcery
Trigger a new review: Comment @sourcery-ai review on the pull request.
Continue discussions: Reply directly to Sourcery's review comments.
Generate a GitHub issue from a review comment: Ask Sourcery to create an
issue from a review comment by replying to it. You can also reply to a
review comment with @sourcery-ai issue to create an issue from it.
Generate a pull request title: Write @sourcery-ai anywhere in the pull
request title to generate a title at any time. You can also comment
@sourcery-ai title on the pull request to (re-)generate the title at any time.
Generate a pull request summary: Write @sourcery-ai summary anywhere in
the pull request body to generate a PR summary at any time exactly where you
want it. You can also comment @sourcery-ai summary on the pull request to
(re-)generate the summary at any time.
Generate reviewer's guide: Comment @sourcery-ai guide on the pull
request to (re-)generate the reviewer's guide at any time.
Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
pull request to resolve all Sourcery comments. Useful if you've already
addressed all the comments and don't want to see them anymore.
Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
request to dismiss all existing Sourcery reviews. Especially useful if you
want to start fresh with a new review - don't forget to comment
@sourcery-ai review to trigger a new review!
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewerTIP This summary will be updated as you push new changes.
greptile-apps[bot]reviewed2h ago
greptile-apps[bot]reviewed2h ago
sourcery-ai[bot]2h ago
Sorry @ashcoft, you've used your own review budget of 250,000 diff characters for the last 7 days.
You can request another review in 1 hour and 47 minutes by commenting @sourcery-ai review. Upgrade to get a review now.
mergify[bot]2h ago
Queue requested — the merge queue status continues in this comment ↓.
devin-ai-integration[bot]reviewed2h ago
devin-ai-integration[bot]reviewed2h ago
devin-ai-integration[bot]2h ago
NOTE
Newer findings are available below. Devin Review posted a newer report on this PR, in addition to the findings presented here.
Devin Review found 1 potential issue.
1 flag not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
kilo-code-bot[bot]reviewed2h ago
devin-ai-integration[bot]reviewed2h ago
devin-ai-integration[bot]reviewed2h ago
devin-ai-integration[bot]reviewed2h ago
devin-ai-integration[bot]reviewed2h ago
devin-ai-integration[bot]2h ago
Devin Review found 1 new potential issue.
1 flag not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
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