Skip to content

Fix escaping dismissal descriptions on MR widget

What does this MR do and why?

Related #460639 (closed)

In French, the dismissal descriptions which get injected on the MR page escapes the string and causes a SyntaxError. This is fixed by using backticks `.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
Screenshot_2024-05-07_at_12.12.59 Screenshot_2024-05-07_at_12.09.04
Screenshot_2024-05-07_at_12.04.09 Screenshot_2024-05-07_at_12.10.30

How to set up and validate locally

Prerequisites

  1. You need an EE license
  2. You need to have runners enabled (See $2408961 for setting up a runner)
  3. Import https://gitlab.com/gitlab-org/govern/demos/sandbox/minac/test-remediations
  4. Do not run a pipeline yet on master!
  5. In the imported test-remediations project
    1. go to reports/sast.json and remove both entries in vulnerabilities, leaving effectively an empty array
    2. commit and push this to master
    3. now, in reports/sast.json, add the removed vulnerabilities back again, but commit and push to a new branch, and create a merge request.
  6. Go to http://gdk.test:3000/-/profile/preferences and set language to French
  7. Go to the MR you just created and validate that you do see the License Compliance widget and Security Report widget
Edited by Lorenz van Herwaarden

Merge request reports