Skip to content

Add html.escape to func_name in superpmi diffs report#125442

Merged
jakobbotsch merged 2 commits intomainfrom
copilot/add-html-escape-to-func-name
Mar 11, 2026
Merged

Add html.escape to func_name in superpmi diffs report#125442
jakobbotsch merged 2 commits intomainfrom
copilot/add-html-escape-to-func-name

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 11, 2026

Method names in asm diffs examples can contain characters like <, >, and & (e.g. generic type parameters). This PR adds html.escape() to func_name when it is rendered in the DetailsSection header of the superpmi diffs report, preventing those characters from being interpreted as HTML.

Copilot AI and others added 2 commits March 11, 2026 13:57
Co-authored-by: jakobbotsch <7887810+jakobbotsch@users.noreply.github.com>
@github-actions github-actions Bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Mar 11, 2026
@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

@jakobbotsch jakobbotsch marked this pull request as ready for review March 11, 2026 15:23
Copilot AI review requested due to automatic review settings March 11, 2026 15:23
@jakobbotsch
Copy link
Copy Markdown
Member

PTAL @dotnet/jit-contrib. Had a case where a function with name <Select> broke the asmdiff report because that gets rendered as a HTML dropdown in markdown.

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

This PR hardens the SuperPMI asm diffs markdown report against HTML interpretation issues by escaping method names that may contain characters like <, >, and & when rendered inside HTML <summary> elements.

Changes:

  • Import Python’s html module in superpmi.py.
  • HTML-escape func_name when composing the DetailsSection header for example diffs.

@jakobbotsch
Copy link
Copy Markdown
Member

/ba-g Timeouts

@jakobbotsch jakobbotsch merged commit 1f6255e into main Mar 11, 2026
108 of 111 checks passed
@jakobbotsch jakobbotsch deleted the copilot/add-html-escape-to-func-name branch March 11, 2026 22:24
Copilot AI added a commit that referenced this pull request Mar 13, 2026
Method names in asm diffs examples can contain characters like `<`, `>`,
and `&` (e.g. generic type parameters). This PR adds `html.escape()` to
`func_name` when it is rendered in the `DetailsSection` header of the
superpmi diffs report, preventing those characters from being
interpreted as HTML.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jakobbotsch <7887810+jakobbotsch@users.noreply.github.com>
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants