Skip to content

fix: escape section names in map - #13

Open
carochacs wants to merge 1 commit into
got-feedBack:mainfrom
get-flashbacks:secfix-310726
Open

fix: escape section names in map#13
carochacs wants to merge 1 commit into
got-feedBack:mainfrom
get-flashbacks:secfix-310726

Conversation

@carochacs

@carochacs carochacs commented Jul 31, 2026

Copy link
Copy Markdown

Song metadata is untrusted package input. Escape labels before inserting them into HTML to prevent markup injection.

Summary by CodeRabbit

  • Bug Fixes

    • Improved minimap security by safely escaping section labels and titles before displaying them.
    • Prevented markup-sensitive characters in section names from affecting minimap content.
  • Tests

    • Added regression coverage for safely handling special characters in section names.
  • Chores

    • Updated the plugin version to 1.1.1.

Song metadata is untrusted package input. Escape labels before inserting them into HTML to prevent markup injection.
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f47d6e84-3e96-4557-b1b0-2004d4247998

📥 Commits

Reviewing files that changed from the base of the PR and between 33953e9 and 3042ab0.

📒 Files selected for processing (3)
  • plugin.json
  • screen.js
  • tests/screen.test.js

📝 Walkthrough

Walkthrough

The section map now HTML-escapes section labels and tooltip titles. The escape helper is exported for Node tests, regression coverage was added, and the plugin version was updated to 1.1.1.

Changes

Section-map rendering safety

Layer / File(s) Summary
Escape section-map labels before rendering
screen.js, tests/screen.test.js, plugin.json
_smRender escapes section labels and tooltip titles before HTML insertion. _smEscapeHtml is exported for Node tests. Tests cover tags, quotes, apostrophes, and ampersands. The plugin version is 1.1.1.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: byrongamatos

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: escaping section names before inserting them into the map.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Comment @coderabbitai help to get the list of available commands.

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.

1 participant