From ed7ac39cb7196cba474c5feece52b4dc746f0e60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophile=20Choutri=20de=20Tarl=C3=A9?= Date: Tue, 5 Nov 2024 21:03:21 +0100 Subject: [PATCH] Render the HTML of readmes and changelogs (#781) * Render the HTML of readmes and changelogs * Add changelog entry --- changelog.d/781 | 5 +++++ src/web/FloraWeb/Pages/Templates/Packages.hs | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 changelog.d/781 diff --git a/changelog.d/781 b/changelog.d/781 new file mode 100644 index 00000000..6a2551c2 --- /dev/null +++ b/changelog.d/781 @@ -0,0 +1,5 @@ +synopsis: Render the HTML of READMEs and Changelogs +description: { + There was a regression, likely due to the switch to lucid2, that escaped the HTML from READMEs and Changelogs +} +prs: #781 diff --git a/src/web/FloraWeb/Pages/Templates/Packages.hs b/src/web/FloraWeb/Pages/Templates/Packages.hs index ea96b85c..c312e7d0 100644 --- a/src/web/FloraWeb/Pages/Templates/Packages.hs +++ b/src/web/FloraWeb/Pages/Templates/Packages.hs @@ -235,7 +235,7 @@ showChangelog namespace packageName version mChangelog = div_ [class_ "container section_ [class_ "release-changelog"] $ do case mChangelog of Nothing -> toHtml @Text "This release does not have a Changelog" - Just changelogText -> toHtml changelogText + Just changelogText -> toHtmlRaw changelogText displayReleaseVersion :: Version -> FloraHTML displayReleaseVersion = toHtml @@ -306,7 +306,7 @@ displayReadme :: Release -> FloraHTML displayReadme release = case readme release of Nothing -> renderHaddock release.description - Just readme -> toHtml readme + Just readme -> toHtmlRaw readme displayVersions :: Namespace -> PackageName -> Vector Release -> Word -> FloraHTML displayVersions namespace packageName versions numberOfReleases =