From: bep Date: Tue, 10 Feb 2015 13:37:29 +0000 (+0100) Subject: Avoid converting summary to []byte and back to string X-Git-Tag: v0.13~54 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=22d85c2a182642da010e3963d5ed5c64325aebb7;p=brevno-suite%2Fhugo Avoid converting summary to []byte and back to string --- diff --git a/hugolib/page.go b/hugolib/page.go index 7b3e67a6..7aec841a 100644 --- a/hugolib/page.go +++ b/hugolib/page.go @@ -191,7 +191,7 @@ func (p *Page) setSummary() { // If hugo defines split: // render, strip html, then split summary, truncated := helpers.TruncateWordsToWholeSentence(p.PlainWords(), helpers.SummaryLength) - p.Summary = helpers.BytesToHTML([]byte(summary)) + p.Summary = template.HTML(summary) p.Truncated = truncated }