"Create a bug" template has broken triple-backtick markdown formatting (missing newlines) for MOZ_CRASH Reason
Categories
(Socorro :: General, defect, P2)
Tracking
(Not tracked)
People
(Reporter: dholbert, Assigned: bdanforth)
Details
Attachments
(2 files)
STR:
- View the Bugzilla tab for a crash report with a "MOZ_CRASH Reason" field, like
https://crash-stats.mozilla.org/report/index/2827f0eb-4a80-421e-a287-4c77f0240911#tab-bugzilla - Next to "Create a Bug", click "Core"
- Click "Preview" on the initial comment of the bug to see how it would look if you filed it.
ACTUAL RESULTS:
The triple-backtick markdown formatting is wrong, because the triple-backtick didn't get its own line. Specifically: the "MOZ_CRASH Reason" has three backticks and then the value, shown directly as regular text (the triple-backtick doesn't start a source code block). Then the triple-backtick that's meant to end that source block ends up starting a block instead, etc.
EXPECTED RESULTS:
The pre-populated text should include a newline character before and after the triple-backtick sequence just before the "MOZ_CRASH Reason" value.
Reporter | ||
Comment 1•10 days ago
|
||
Reporter | ||
Comment 2•10 days ago
•
|
||
The special Bugzilla URL that Soccorro offers is here.
You can reproduce this issue just by directly clicking that^ link (and then clicking "Preview").
And here's a manually edited version of that link where I've inserted %0A
(URL-encoded newline) before and after the first %60%60%60
(which is the URL-encoded triple-backtick). This avoids the issue.
Comment 3•10 days ago
|
||
Looks like the moz_cras_reason for that crash report has a \n
at the end so then the fenced code block gets interpreted differently and that messes it up.
We should strip the moz crash reason of whitespace at the beginning and ending in the template.
Then we could switch to single-backtick code for that string or triple-backtick single-line fenced-block or triple-backtick multi-line fenced-block like you suggested. I think any of those would work, though I think we've had instances where there are single-backticks in the moz crash reason for whatever reason which is why we went with triple-backtick single-line.
Updated•4 days ago
|
Assignee | ||
Updated•4 days ago
|
Assignee | ||
Comment 4•2 days ago
|
||
Looks like there's been a change more recently somewhere that's caused the Description field to be empty now. I'll have to look into that first and come back to this one to see if it's still an issue.
Assignee | ||
Comment 5•2 days ago
•
|
||
Okay there was an upstream Bugzilla bug with the comment
query parameter in the create bug URL that has since been fixed (Bug 1919789, listed as a regressing bug for Bug 1919823 that this bug depends on), so I can now reproduce this issue. I will start working on a fix.
Edit: Actually I can't reproduce this issue anymore -- the formatting looks correct to me now. I've submitted a patch anyway to have the desired effect with Markdown formatting.
Assignee | ||
Comment 6•1 day ago
|
||
Assignee | ||
Comment 7•20 hours ago
|
||
Assignee | ||
Comment 8•20 hours ago
|
||
Hoping to deploy this to production next week. When I do, I'll add a comment here linking to the deploy bug.
Description
•