shithub: hugo

Download patch

ref: 22d85c2a182642da010e3963d5ed5c64325aebb7
parent: 371c148c340b611e9c78a8e56f19236df3e57c61
author: bep <[email protected]>
date: Tue Feb 10 09:37:29 EST 2015

Avoid converting summary to []byte and back to string

--- a/hugolib/page.go
+++ b/hugolib/page.go
@@ -191,7 +191,7 @@
 		// 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
 
 	}