Skip to content

Escape data before send to result view#110

Merged
mattwar merged 2 commits into
mainfrom
user/mattwar/DataTableEscape
May 12, 2026
Merged

Escape data before send to result view#110
mattwar merged 2 commits into
mainfrom
user/mattwar/DataTableEscape

Conversation

@mattwar

@mattwar mattwar commented May 12, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings May 12, 2026 17:21

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.

Pull request overview

This PR hardens the results grid data path by HTML-escaping cell values before embedding them into the Simple-DataTables payload, preventing the grid from interpreting user data as HTML (and addressing crashes like the <email@...> case).

Changes:

  • Added HTML escaping for result cell values in DataTableProvider before JSON serialization into the webview init script.
  • Updated existing unit expectations around dynamic-object formatting and script-tag escaping.
  • Added new unit tests covering escaping for angle brackets, ampersands, quotes, and apostrophes.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/Client/features/dataTableProvider.ts Introduces HTML escaping for cell values before embedding result data into the webview table initializer.
src/Client/tests/unit/dataTableProvider.test.ts Updates/extends unit coverage to assert the new escaping behavior in the embedded HTML payload.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Client/features/dataTableProvider.ts
Comment thread src/Client/features/dataTableProvider.ts Outdated
Comment thread src/Client/tests/unit/dataTableProvider.test.ts Outdated
@mattwar mattwar merged commit aacb107 into main May 12, 2026
5 checks passed
@mattwar mattwar deleted the user/mattwar/DataTableEscape branch May 12, 2026 17:59
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.

2 participants