Skip to content

Bug 2101264 - Add ability to show a markdown version of a bug report - #2857

Open
dklawren wants to merge 3 commits into
mozilla:masterfrom
dklawren:markdown-bug
Open

dklawren wants to merge 3 commits into
mozilla:masterfrom
dklawren:markdown-bug

Conversation

@dklawren

@dklawren dklawren commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The Markdown export still misnests attachment flags, reformats comments that should remain literal, and includes summaries excluded by field filtering.

3 open issues
What changed in this PR

Adds Markdown bug-report exports through the existing show_bug.cgi flow.

Changes:

  • Adds a Markdown template for bug details, flags, attachments, and comments.
  • Registers the content type and adds a Markdown export menu option.
  • Adds export tests and adjusts template-filter checks.
File Description
template/​en/​default/​bug/​show.md.tmpl Renders bug reports as Markdown.
t/​bmo/​show-bug-markdown.t Tests export content and logged-out privacy.
t/​008filter.t Exempts Markdown templates from HTML-filter checks.
extensions/​BugModal/​template/​en/​default/​bug_modal/​edit.html.tmpl Adds the Markdown export link.
Bugzilla/​Constants.pm Registers text/markdown.
Bugzilla/​CGI.pm Recognizes Markdown in response-safety checks.

Review effort: Balanced

Comment thread template/en/default/bug/show.md.tmpl Resolved
Comment thread template/en/default/bug/show.md.tmpl Resolved
Comment thread template/en/default/bug/show.md.tmpl Resolved
dklawren and others added 2 commits December 3, 2026 17:57
- Only include the summary in the heading when short_desc is displayed
- Emit comments that are not markdown as indented code blocks so they stay literal
- Indent attachment flags after capturing them, since TRIM strips leading space
@dklawren
dklawren requested review from Xzzz and cgsheeh and a balanced review from Copilot December 3, 2026 23:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unescaped metadata is interpreted as Markdown, allowing tag text to disappear and punctuation to alter displayed summaries, field values, user identities, and attachment details.

1 open issue
3 resolved since last review

Review effort: Balanced

Comment thread template/en/default/bug/show.md.tmpl Resolved

This branch has not been deployed

No deployments
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