Skip to content

Commit

Permalink
add template.HTML function
Browse files Browse the repository at this point in the history
  • Loading branch information
0c34 committed Nov 5, 2017
1 parent 884a8ba commit 7974c1e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions util/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,7 @@ func UnSafeRender(w http.ResponseWriter, name string, data ...interface{}) {
template := template.Must(template.ParseGlob("templates/*"))
template.ExecuteTemplate(w, name, data)
}

func ToHTML(text string)template.HTML{
return template.HTML(text)
}

0 comments on commit 7974c1e

Please sign in to comment.