Error in comment Markdown when marking task list items as complete

Summary

Given a task list of items, you can edit the original post and mark one or more as complete. Gitlab will add a note after the post saying that the task is complete. This note has incorrect markdown formatting if the task has double-star **bold text** in it.

~Frontend ~bug markdown reproduced on GitLab.com

Steps to reproduce

  1. Create an issue with a task list with an item that uses ** to denote bold text. Ensure that there is non-bold text following the emphasis.
  2. Save the Issue
  3. Edit the issue and mark the task as complete

Expected behavior

Entire issue text is marked as bold. Also see Possible Fixes, below.

Relevant logs and/or screenshots

image

If the original task uses double-underscores __ instead, then the resulting "marked complete" note is correct:

image

Output of checks

Reproduced on Gitlab.com

Possible fixes

  1. Escape any star * characters in the task text before submitting the "marked complete" comment.
  2. Change the behavior to surround the task text with quotation marks " rather than double-star **.