Skip to content

fix(trace): escape span labels in D3 trace list and tree views - #594

Closed
adityareddy-dev wants to merge 1 commit into
apache:mainfrom
adityareddy-dev:fix/escape-trace-d3-labels
Closed

adityareddy-dev wants to merge 1 commit into
apache:mainfrom
adityareddy-dev:fix/escape-trace-d3-labels

Conversation

@adityareddy-dev

Copy link
Copy Markdown

Switch the trace list row label in d3-trace-list.ts from .html() to .text(), matching d3-trace-tree.ts. In the d3-tip tooltips, escape d.data.label in both files and d.data.type in d3-trace-list.ts using the existing escapeHtml helper from src/utils/flameGraph.ts.

This keeps HTML characters in span endpoint names or types from being parsed as raw markup. Submitted publicly as a hardening change after checking with ASF Security.

Added unit tests in d3-trace-escaping.spec.ts. Ran npm run lint, npm run build, npm run check-components-types, and TZ=UTC npm run test:unit.

Switch ListGraph row labels from .html() to .text() and escape tooltip labels and types with escapeHtml in d3-trace-list.ts and d3-trace-tree.ts.
@wu-sheng wu-sheng added this to the 10.5.0 milestone Dec 2, 2026
@wu-sheng

wu-sheng commented Dec 2, 2026

Copy link
Copy Markdown
Member

This repo has been replaced by Horizon UI

@wu-sheng wu-sheng closed this Dec 2, 2026
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