Skip to content

Commit

Permalink
Do not escape HTML in html_br template function
Browse files Browse the repository at this point in the history
  • Loading branch information
janos committed Sep 15, 2019
1 parent 93acf9d commit dd9fd7a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions templates/functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ func containsStringFunc(list []string, element, yes, no string) string {
}

func htmlBrFunc(text string) string {
text = template.HTMLEscapeString(text)
return strings.Replace(text, "\n", "<br>", -1)
return strings.ReplaceAll(text, "\n", "<br>")
}

func mapFunc(values ...interface{}) (map[string]interface{}, error) {
Expand Down

0 comments on commit dd9fd7a

Please sign in to comment.