Skip to content

CCR feedback on escaping file names#8661

Merged
alexr00 merged 2 commits intomainfrom
alexr00/legislative-dinosaur
Apr 13, 2026
Merged

CCR feedback on escaping file names#8661
alexr00 merged 2 commits intomainfrom
alexr00/legislative-dinosaur

Conversation

@alexr00
Copy link
Copy Markdown
Member

@alexr00 alexr00 commented Apr 13, 2026

No description provided.

Copilot AI review requested due to automatic review settings April 13, 2026 14:40
@alexr00 alexr00 enabled auto-merge (squash) April 13, 2026 14:40
@alexr00 alexr00 self-assigned this Apr 13, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds test coverage and a reusable utility for HTML-escaping file paths/names when injecting them into data-local-file attributes, addressing CCR feedback around safe link processing.

Changes:

  • Export escapeHtmlAttr from src/common/utils.ts and refactor it to a single-pass replacement.
  • Add tests verifying processPermalinks / processDiffLinks output escapes special characters.
  • Add unit tests for escapeHtmlAttr across common special-character cases.
Show a summary per file
File Description
src/test/common/utils.test.ts Adds coverage for escaping in processed permalink/diff links and direct tests for escapeHtmlAttr.
src/common/utils.ts Exports and refactors escapeHtmlAttr used to escape data-local-file attribute values.

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 1

Comment thread src/test/common/utils.test.ts Outdated
@alexr00 alexr00 merged commit f62ad7f into main Apr 13, 2026
6 checks passed
@alexr00 alexr00 deleted the alexr00/legislative-dinosaur branch April 13, 2026 15:04
asperpharma

This comment was marked as spam.

asperpharma

This comment was marked as spam.

asperpharma

This comment was marked as spam.

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.

4 participants