Avoid converting summary to []byte and back to string

This commit is contained in:
bep 2015-02-10 14:37:29 +01:00
parent 371c148c34
commit 22d85c2a18

View file

@ -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
}