From 529c4789f73744ec2d6b649464274c08bafee2ef Mon Sep 17 00:00:00 2001 From: colin-lamed <9568290+colin-lamed@users.noreply.github.com> Date: Tue, 3 Dec 2024 13:14:30 +0000 Subject: [PATCH] Render vulnerability description markdown --- .../vulnerabilities/view/VulnerabilityDetails.scala.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/uk/gov/hmrc/cataloguefrontend/vulnerabilities/view/VulnerabilityDetails.scala.html b/app/uk/gov/hmrc/cataloguefrontend/vulnerabilities/view/VulnerabilityDetails.scala.html index 829d15ed8..7474ed6cd 100644 --- a/app/uk/gov/hmrc/cataloguefrontend/vulnerabilities/view/VulnerabilityDetails.scala.html +++ b/app/uk/gov/hmrc/cataloguefrontend/vulnerabilities/view/VulnerabilityDetails.scala.html @@ -17,6 +17,7 @@ @import uk.gov.hmrc.cataloguefrontend.{routes => appRoutes} @import uk.gov.hmrc.cataloguefrontend.connector.model.DependencyScope @import uk.gov.hmrc.cataloguefrontend.dependency.DependencyExplorerController +@import uk.gov.hmrc.cataloguefrontend.util.MarkdownLoader @import uk.gov.hmrc.cataloguefrontend.util.DateHelper._ @import uk.gov.hmrc.cataloguefrontend.vulnerabilities.VulnerabilitySummary @@ -40,7 +41,10 @@

Description:

- @vuln.distinctVulnerability.description + @MarkdownLoader.markdownFromString(vuln.distinctVulnerability.description) match { + case Right(s) => {@Html(s)} + case Left(_) => {@vuln.distinctVulnerability.description} + }