Skip to content

fix(toolbar): escape selectors in markdown audit export - #295

Merged
dermatz merged 4 commits into
mainfrom
fix/markdown-export-escaping
Nov 13, 2026
Merged

dermatz merged 4 commits into
mainfrom
fix/markdown-export-escaping

Conversation

@dermatz

@dermatz dermatz commented Nov 13, 2026

Copy link
Copy Markdown
Member

Selectors (e.g. from ids or attribute-based labels) containing | or backticks broke the findings table in the Markdown export. Pipes are now escaped, backticks replaced and whitespace collapsed before writing the code span.

Pipes and backticks in element selectors broke the findings table of the
Markdown export.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 13, 2026 07:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues remain for the selector-sanitization change in Markdown audit-export tables.

No open issues 🎉

What changed in this PR

Fixes Markdown findings tables in the toolbar’s audit export when selectors contain pipes, backticks, or whitespace.

Changes:

  • Adds escapeMdCode() to escape pipes, replace backticks with apostrophes, and collapse whitespace.
  • Applies the helper to selectors before inserting them into exported table rows.
File Description
src/​view/​frontend/​web/​js/​toolbar/​audits.js Sanitises selectors for inline code spans in Markdown findings tables.

Review effort: Balanced

@greptile-apps

greptile-apps Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge.

Summary

The PR escapes pipes, replaces backticks, and collapses whitespace in Markdown findings tables.

  • Markdown audit exports keep selector findings in their table rows.

Reviews (3) · Last reviewed commit: "fix(toolbar): remove unrelated website c..." · Reviewed by Greptile

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 13, 2026 07:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The Markdown export doubles existing backslashes in selector labels, changing their rendered values so they no longer match the originals.

1 open issue

Review effort: Balanced

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 13, 2026 08:02
@github-actions github-actions Bot added Styling Website Project website (website/) labels Nov 13, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

At widths ≤36rem, scope-less upcoming entries span both grid columns, forcing the PR link onto a separate row instead of preserving its right-hand placement.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 13, 2026 08:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues remain for the selector-sanitization change to the toolbar audit’s Markdown export.

No open issues 🎉

Review effort: Balanced

@dermatz
dermatz merged commit e89faa2 into main Nov 13, 2026
23 checks passed
@dermatz
dermatz deleted the fix/markdown-export-escaping branch November 13, 2026 08:10
@github-actions github-actions Bot mentioned this pull request Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants