fix: use 6-backtick fences in summaries to prevent escaping breakage#17384
Merged
fix: use 6-backtick fences in summaries to prevent escaping breakage#17384
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix summary escaping issue in markdown generation
fix: use 6-backtick fences in summaries to prevent escaping breakage
Feb 21, 2026
pelikhan
approved these changes
Feb 21, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a markdown rendering bug where content containing triple backticks would break GitHub Actions step summaries by prematurely closing outer code fences.
Changes:
- Updated code fence delimiters from 3 to 6 backticks in summary generation functions
- Added test coverage for content containing triple backticks
- Aligned all callsites with the existing 6-backtick convention established in log_parser_shared.cjs
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| actions/setup/js/safe_output_summary.cjs | Changed body preview and message details code fences from 3 to 6 backticks |
| actions/setup/js/log_parser_shared.cjs | Changed safe-outputs body preview code fences from 3 to 6 backticks |
| actions/setup/js/safe_output_summary.test.cjs | Added tests for body content and error messages containing triple backticks |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Step summaries broke when safe-output body content (issue/PR bodies, error details) contained triple-backtick code fences — the inner
```prematurely closed the outer fence, leaking raw content including XML-like tags into the rendered summary.Changes
safe_output_summary.cjs: Change 3→6 backtick fences for body preview and message details JSONlog_parser_shared.cjs: Change 3→6 backtick fences for safe-outputs body previewsafe_output_summary.test.cjs: Add tests for body content containing triple backticksBefore / After
The 6-backtick convention was already established in
log_parser_shared.cjs(line 962: "Use 6 backticks to avoid conflicts with content that may contain 3 or 5 backticks"); these changes bring the remaining callsites in line with it.Original prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.