Skip to content

<details open> in safe-output bodies renders as escaped text since v1.0.1 #75115

Open

Description

@yosuakoeswandy

<details open> in safe-output bodies renders as escaped text since v1.0.1

Analysis

Since #72415 (v1.0.1), create_issue, add_comment and the other publishers parse agent bodies with parseReportMarkdown. The parser only recognizes a literal <details>, so <details open> falls through to paragraphs, and the output shows &lt;details open&gt;…&lt;/details&gt; as text. In v1.0.0 the body only went through sanitizeContent, which deliberately keeps open (sanitize_content.test.cjs:870).

Repro:

<details open>
<summary>Open</summary>

body

</details>

This currently renders as escaped text. A plain <details> renders correctly.

Implementation plan

  1. actions/setup/js/report_markdown.cjs
    • In the block-start regex (around L401), accept <details(?:\s+open)?>.
    • In the two details branches (around L505 and L508), accept the same form and set open: true.
  2. actions/setup/js/report_ast.cjs
    • Add open?: boolean to the details typedef (L23).
    • Carry open through when the details node is normalized (around L405).
    • Have the renderer (around L671) emit <details open> when open is set.
  3. Tests: add cases to report_html_fidelity.test.cjs for both the inline (<details open><summary>) and two-line forms. Assert that the tree has open: true and that rendering round-trips. Keep <details> with any other attribute rejected as it is today.
  4. Add a patch changeset and run make agent-finish.

Acceptance: <details open> in an agent body publishes as an expanded details block, and existing <details> output is unchanged.

Activity

  1. locked and limited conversation to collaborators on Nov 5, 2026
  2. unlocked this conversation on Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions