File tree Expand file tree Collapse file tree
.github/workflows/scripts Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -212,10 +212,11 @@ def format_comment(
212212 path = _safe_path (item ["path" ])
213213 diff_text = item .get ("diff" , "" )
214214 fence = _fence_for (diff_text )
215- # Plain markdown — no raw HTML — so an attacker-controlled path
216- # can't introduce tags. `<details>` stays because its children
217- # are plain markdown + a dynamic fence longer than any backtick
218- # run in the diff body.
215+ # Emit fixed raw HTML for the collapsible wrapper (`<details>` and
216+ # `<summary>`), but keep attacker-controlled content in markdown
217+ # code formatting: the path is rendered as code in the summary, and
218+ # the diff body is inside a dynamically chosen fence longer than any
219+ # backtick run in the diff text.
219220 block = (
220221 "<details>\n "
221222 f"<summary>`{ path } `</summary>\n \n "
You can’t perform that action at this time.
0 commit comments