diff --git a/hugolib/hugo_sites_build.go b/hugolib/hugo_sites_build.go index 0c1ec050b..167d19eb5 100644 --- a/hugolib/hugo_sites_build.go +++ b/hugolib/hugo_sites_build.go @@ -492,10 +492,15 @@ func (h *HugoSites) writeBuildStats() error { HTMLElements: *htmlElements, } - js, err := json.MarshalIndent(stats, "", " ") + var buf bytes.Buffer + enc := json.NewEncoder(&buf) + enc.SetEscapeHTML(false) + enc.SetIndent("", " ") + err := enc.Encode(stats) if err != nil { return err } + js := buf.Bytes() filename := filepath.Join(h.Configs.LoadingInfo.BaseConfig.WorkingDir, files.FilenameHugoStatsJSON) diff --git a/hugolib/site_test.go b/hugolib/site_test.go index f4d63943f..57c6bbabe 100644 --- a/hugolib/site_test.go +++ b/hugolib/site_test.go @@ -1116,7 +1116,7 @@ minify = %t Some text. -
Foo
+
Foo
FOO @@ -1144,6 +1144,7 @@ Some text. "d", "e", "hover:text-gradient", + "[&>p]:text-red-600", "inline-block", "lowercase", "pb-1",